home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-05-24 | 13.8 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue May 24 11:06:11 1994, modified Tue May 24 11:06:11 1994, creator Think C, type ASCII, 12328 bytes "graphics shell.c" , at 0x30a8 1442 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 10 67 72 61 70 68 69 | 63 73 20 73 68 65 6c 6c |..graphi|cs shell|
|00000010| 2e 63 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.c......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 30 28 00 | 00 05 a2 aa 07 c8 63 aa |.....0(.|......c.|
|00000060| 07 c8 63 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..c.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 22 0a 00 00 |........|...."...|
|00000080| 2f 2a 2a 20 20 0d 20 2d | 2d 09 09 67 72 61 70 68 |/** . -|-..graph|
|00000090| 69 63 73 20 73 68 65 6c | 6c 2e 63 0d 20 2d 2d 0d |ics shel|l.c. --.|
|000000a0| 20 2d 2d 09 09 54 68 69 | 73 20 66 69 6c 65 20 69 | --..Thi|s file i|
|000000b0| 73 20 61 20 73 68 65 6c | 6c 20 74 68 61 74 20 63 |s a shel|l that c|
|000000c0| 61 6e 20 62 65 20 75 73 | 65 64 20 74 6f 20 62 75 |an be us|ed to bu|
|000000d0| 69 6c 64 20 51 75 69 63 | 6b 44 72 61 77 20 47 58 |ild Quic|kDraw GX|
|000000e0| 20 67 72 61 70 68 69 63 | 73 20 61 70 70 6c 69 63 | graphic|s applic|
|000000f0| 61 74 69 6f 6e 73 2e 20 | 20 0d 20 2d 2d 09 09 49 |ations. | . --..I|
|00000100| 74 20 63 6f 6e 74 61 69 | 6e 73 20 61 6c 6c 20 6f |t contai|ns all o|
|00000110| 66 20 74 68 65 20 72 65 | 71 75 69 72 65 64 20 63 |f the re|quired c|
|00000120| 61 6c 6c 73 20 74 6f 20 | 75 73 65 20 74 68 65 20 |alls to |use the |
|00000130| 22 6e 65 77 22 20 51 75 | 69 63 6b 44 72 61 77 20 |"new" Qu|ickDraw |
|00000140| 47 58 20 72 6f 75 74 69 | 6e 65 73 20 61 6e 64 20 |GX routi|nes and |
|00000150| 0d 20 2d 2d 09 09 51 75 | 69 63 6b 44 72 61 77 20 |. --..Qu|ickDraw |
|00000160| 28 69 2e 65 2e 20 77 69 | 6e 64 6f 77 73 29 20 74 |(i.e. wi|ndows) t|
|00000170| 6f 67 65 74 68 65 72 2e | 20 49 74 20 77 69 6c 6c |ogether.| It will|
|00000180| 20 70 75 74 20 75 70 20 | 6f 6e 65 20 77 69 6e 64 | put up |one wind|
|00000190| 6f 77 2e 20 59 6f 75 20 | 22 71 75 69 74 22 20 0d |ow. You |"quit" .|
|000001a0| 20 2d 2d 09 09 74 68 65 | 20 61 70 70 6c 69 63 61 | --..the| applica|
|000001b0| 74 69 6f 6e 20 62 79 20 | 63 6c 69 63 6b 69 6e 67 |tion by |clicking|
|000001c0| 20 69 6e 20 74 68 65 20 | 63 6c 6f 73 65 20 62 6f | in the |close bo|
|000001d0| 78 2e 20 20 54 68 69 73 | 20 73 68 65 6c 6c 20 64 |x. This| shell d|
|000001e0| 6f 65 73 20 6e 6f 74 20 | 75 73 65 20 61 20 6d 65 |oes not |use a me|
|000001f0| 6e 75 2e 0d 20 2d 2d 09 | 09 0d 20 2d 2d 20 09 54 |nu.. --.|.. -- .T|
|00000200| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 69 |he appli|cation i|
|00000210| 73 20 65 78 70 65 63 74 | 65 64 20 74 6f 20 73 75 |s expect|ed to su|
|00000220| 70 70 6c 79 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |pply the| followi|
|00000230| 6e 67 20 66 75 6e 63 74 | 69 6f 6e 73 20 77 68 69 |ng funct|ions whi|
|00000240| 63 68 20 61 72 65 20 63 | 61 6c 6c 65 64 0d 20 2d |ch are c|alled. -|
|00000250| 2d 09 09 62 79 20 74 68 | 69 73 20 73 68 65 6c 6c |-..by th|is shell|
|00000260| 3a 0d 20 2d 2d 0d 20 2d | 2d 09 09 09 76 6f 69 64 |:. --. -|-...void|
|00000270| 20 44 6f 49 6e 69 74 69 | 61 6c 69 7a 61 74 69 6f | DoIniti|alizatio|
|00000280| 6e 28 57 69 6e 64 6f 77 | 50 74 72 29 3b 0d 20 2d |n(Window|Ptr);. -|
|00000290| 2d 09 09 09 76 6f 69 64 | 20 44 6f 44 72 61 77 28 |-...void| DoDraw(|
|000002a0| 57 69 6e 64 6f 77 50 74 | 72 29 3b 0d 20 2d 2d 09 |WindowPt|r);. --.|
|000002b0| 09 09 76 6f 69 64 20 44 | 6f 44 69 73 70 6f 73 65 |..void D|oDispose|
|000002c0| 28 57 69 6e 64 6f 77 50 | 74 72 29 3b 0d 20 2d 2d |(WindowP|tr);. --|
|000002d0| 09 09 09 76 6f 69 64 20 | 44 6f 43 6c 69 63 6b 28 |...void |DoClick(|
|000002e0| 67 78 50 6f 69 6e 74 2c | 20 57 69 6e 64 6f 77 50 |gxPoint,| WindowP|
|000002f0| 74 72 29 3b 0d 20 2d 2d | 09 09 09 76 6f 69 64 20 |tr);. --|...void |
|00000300| 44 6f 49 64 6c 65 28 57 | 69 6e 64 6f 77 50 74 72 |DoIdle(W|indowPtr|
|00000310| 29 3b 0d 20 2d 2d 0d 20 | 2d 2d 0d 20 2d 2d 20 20 |);. --. |--. -- |
|00000320| 20 20 20 43 68 61 6e 67 | 65 20 48 69 73 74 6f 72 | Chang|e Histor|
|00000330| 79 3a 20 09 09 0d 20 2d | 2d 0d 20 2d 2d 09 09 34 |y: ... -|-. --..4|
|00000340| 2f 39 34 09 2d 20 41 64 | 64 65 64 20 74 68 65 20 |/94.- Ad|ded the |
|00000350| 67 78 50 6f 69 6e 74 20 | 61 73 20 61 20 70 61 72 |gxPoint |as a par|
|00000360| 61 6d 65 74 65 72 20 74 | 6f 20 74 68 65 20 44 6f |ameter t|o the Do|
|00000370| 43 6c 69 63 6b 28 20 67 | 78 50 6f 69 6e 74 20 6d |Click( g|xPoint m|
|00000380| 6f 75 73 65 4c 6f 63 2c | 20 57 69 6e 64 6f 77 50 |ouseLoc,| WindowP|
|00000390| 74 72 20 6d 79 57 69 6e | 64 6f 77 20 29 20 0d 20 |tr myWin|dow ) . |
|000003a0| 2d 2d 09 09 09 09 20 20 | 66 75 6e 63 74 69 6f 6e |--.... |function|
|000003b0| 20 74 6f 20 73 75 70 70 | 6f 72 74 20 68 69 74 20 | to supp|ort hit |
|000003c0| 74 65 73 74 69 6e 67 2e | 20 20 50 4c 41 0d 20 2d |testing.| PLA. -|
|000003d0| 2d 0d 20 2d 2d 09 09 33 | 2f 39 34 09 2d 20 52 65 |-. --..3|/94.- Re|
|000003e0| 6d 6f 76 65 64 20 74 68 | 65 20 66 6f 6c 6c 6f 77 |moved th|e follow|
|000003f0| 69 6e 67 20 76 61 72 61 | 69 62 6c 65 73 3a 20 67 |ing vara|ibles: g|
|00000400| 44 65 62 75 67 67 69 6e | 67 20 26 20 67 47 69 76 |Debuggin|g & gGiv|
|00000410| 65 4d 65 56 61 6c 69 64 | 61 74 69 6f 6e 20 73 65 |eMeValid|ation se|
|00000420| 65 20 74 68 65 20 63 6f | 6d 6d 65 6e 74 73 0d 20 |e the co|mments. |
|00000430| 2d 2d 09 09 09 09 20 20 | 66 6f 72 20 64 65 74 61 |--.... |for deta|
|00000440| 69 6c 73 20 28 62 65 6c | 6f 77 29 2e 20 0d 20 2d |ils (bel|ow). . -|
|00000450| 2d 0d 20 2d 2d 09 09 09 | 09 2d 20 41 64 64 65 64 |-. --...|.- Added|
|00000460| 20 61 20 47 65 73 74 61 | 6c 74 20 63 68 65 63 6b | a Gesta|lt check|
|00000470| 20 74 6f 20 73 65 65 20 | 69 66 20 47 58 20 68 61 | to see |if GX ha|
|00000480| 73 20 62 65 65 6e 20 69 | 6e 73 74 61 6c 6c 65 64 |s been i|nstalled|
|00000490| 2e 20 41 64 64 65 64 20 | 65 78 74 65 6e 73 69 76 |. Added |extensiv|
|000004a0| 65 20 65 72 72 6f 72 20 | 0d 20 2d 2d 09 09 09 09 |e error |. --....|
|000004b0| 20 20 63 68 65 63 6b 69 | 6e 67 20 74 6f 20 6d 61 | checki|ng to ma|
|000004c0| 6b 65 20 73 75 72 65 20 | 74 68 65 20 47 58 20 67 |ke sure |the GX g|
|000004d0| 72 61 70 68 69 63 73 20 | 63 6c 69 65 6e 74 20 68 |raphics |client h|
|000004e0| 61 73 20 62 65 65 6e 20 | 63 72 65 61 74 65 64 20 |as been |created |
|000004f0| 61 6e 64 20 74 68 65 20 | 47 58 20 68 65 61 70 0d |and the |GX heap.|
|00000500| 20 2d 2d 09 09 09 09 20 | 20 63 6f 72 72 65 63 74 | --.... | correct|
|00000510| 6c 79 20 61 6c 6c 6f 63 | 61 74 65 64 2e 20 54 68 |ly alloc|ated. Th|
|00000520| 69 73 20 73 68 65 6c 6c | 20 77 69 6c 6c 20 73 68 |is shell| will sh|
|00000530| 75 74 20 64 6f 77 6e 20 | 61 74 20 73 74 61 72 74 |ut down |at start|
|00000540| 2d 75 70 20 61 6e 64 20 | 61 6c 65 72 74 20 74 68 |-up and |alert th|
|00000550| 65 20 75 73 65 72 0d 20 | 2d 2d 09 09 09 09 20 20 |e user. |--.... |
|00000560| 74 6f 20 74 68 65 20 70 | 72 6f 62 6c 65 6d 20 61 |to the p|roblem a|
|00000570| 6e 64 20 62 61 69 6c 20 | 69 66 3a 20 47 58 20 69 |nd bail |if: GX i|
|00000580| 73 20 6e 6f 74 20 69 6e | 73 74 61 6c 6c 65 64 2c |s not in|stalled,|
|00000590| 20 77 65 20 63 61 6e 6e | 6f 74 20 63 72 65 61 74 | we cann|ot creat|
|000005a0| 65 20 74 68 65 20 67 72 | 61 70 68 69 63 73 0d 20 |e the gr|aphics. |
|000005b0| 2d 2d 09 09 09 09 20 20 | 63 6c 69 65 6e 74 2c 20 |--.... |client, |
|000005c0| 6f 72 20 63 72 65 61 74 | 65 20 61 20 47 58 20 68 |or creat|e a GX h|
|000005d0| 65 61 70 2e 20 20 50 4c | 41 0d 20 2d 2d 0d 20 2d |eap. PL|A. --. -|
|000005e0| 2d 09 09 31 32 2f 39 33 | 09 55 70 64 61 74 65 64 |-..12/93|.Updated|
|000005f0| 20 74 68 65 20 63 6f 6d | 6d 65 6e 74 20 61 62 6f | the com|ment abo|
|00000600| 76 65 20 74 68 65 20 47 | 58 4e 65 77 47 72 61 70 |ve the G|XNewGrap|
|00000610| 68 69 63 73 43 4c 69 65 | 6e 74 20 63 61 6c 6c 20 |hicsCLie|nt call |
|00000620| 74 6f 20 72 65 66 6c 65 | 63 74 20 74 68 65 20 6e |to refle|ct the n|
|00000630| 65 77 20 66 75 63 6e 74 | 69 6f 6e 61 6c 69 74 79 |ew fucnt|ionality|
|00000640| 0d 20 2d 2d 09 09 09 09 | 6f 66 20 74 68 69 73 20 |. --....|of this |
|00000650| 63 61 6c 6c 20 69 6e 20 | a7 33 2e 20 49 20 61 6c |call in |.3. I al|
|00000660| 73 6f 20 72 65 6d 6f 76 | 65 64 20 74 68 65 20 77 |so remov|ed the w|
|00000670| 6f 72 6b 20 61 72 6f 75 | 6e 64 20 77 69 74 68 20 |ork arou|nd with |
|00000680| 47 58 43 6f 6e 76 65 72 | 74 51 44 50 6f 69 6e 74 |GXConver|tQDPoint|
|00000690| 20 28 2e 2e 29 20 77 68 | 65 72 65 0d 20 2d 2d 09 | (..) wh|ere. --.|
|000006a0| 09 09 09 74 68 65 20 63 | 61 6c 6c 20 77 6f 75 6c |...the c|all woul|
|000006b0| 64 20 6e 6f 74 20 73 75 | 72 76 69 76 65 20 76 61 |d not su|rvive va|
|000006c0| 6c 69 64 61 74 69 6f 6e | 20 75 6e 64 65 72 20 a7 |lidation| under .|
|000006d0| 32 2e 20 55 6e 64 65 72 | 20 a7 33 20 74 68 65 20 |2. Under| .3 the |
|000006e0| 63 61 6c 6c 20 73 75 63 | 65 65 64 73 20 77 68 65 |call suc|eeds whe|
|000006f0| 6e 20 76 61 6c 69 64 61 | 74 69 6f 6e 0d 20 2d 2d |n valida|tion. --|
|00000700| 09 09 09 09 69 73 20 73 | 65 74 2e 20 20 20 50 4c |....is s|et. PL|
|00000710| 41 0d 20 2d 2d 0d 20 2d | 2d 09 09 38 2f 39 33 09 |A. --. -|-..8/93.|
|00000720| 2d 20 55 70 64 61 74 65 | 64 20 74 68 69 73 20 66 |- Update|d this f|
|00000730| 69 6c 65 20 74 6f 20 72 | 75 6e 20 77 69 74 68 20 |ile to r|un with |
|00000740| 74 68 65 20 51 44 20 47 | 58 20 a7 32 20 22 47 58 |the QD G|X .2 "GX|
|00000750| 2d 69 66 69 65 64 22 20 | 69 6e 74 65 72 66 61 63 |-ified" |interfac|
|00000760| 65 73 0d 20 2d 2d 09 09 | 09 09 2d 20 77 6f 72 6b |es. --..|..- work|
|00000770| 65 64 20 61 72 6f 75 6e | 64 20 61 20 70 72 6f 62 |ed aroun|d a prob|
|00000780| 6c 65 6d 20 77 69 74 68 | 20 47 58 43 6f 6e 76 65 |lem with| GXConve|
|00000790| 72 74 51 44 50 6f 69 6e | 74 20 28 2e 2e 29 20 73 |rtQDPoin|t (..) s|
|000007a0| 65 65 20 74 68 65 20 63 | 6f 6d 6d 65 6e 74 73 20 |ee the c|omments |
|000007b0| 77 69 74 68 69 6e 0d 20 | 2d 2d 09 09 09 09 20 20 |within. |--.... |
|000007c0| 74 68 65 20 47 65 74 57 | 69 6e 64 6f 77 42 6f 75 |the GetW|indowBou|
|000007d0| 6e 64 73 53 68 61 70 65 | 20 28 2e 2e 29 20 63 61 |ndsShape| (..) ca|
|000007e0| 6c 6c 20 66 6f 72 20 64 | 65 74 61 69 6c 73 20 28 |ll for d|etails (|
|000007f0| 62 65 6c 6f 77 29 2e 20 | 20 50 4c 41 0d 20 2d 2d |below). | PLA. --|
|00000800| 0d 20 2d 2d 09 09 36 2f | 39 32 09 4d 61 64 65 20 |. --..6/|92.Made |
|00000810| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 76 61 |the foll|owing va|
|00000820| 72 69 61 62 6c 65 73 20 | 67 6c 6f 62 61 6c 3a 20 |riables |global: |
|00000830| 67 44 65 62 75 67 67 69 | 6e 67 2c 20 67 47 69 76 |gDebuggi|ng, gGiv|
|00000840| 65 4d 65 56 61 6c 69 64 | 61 74 69 6f 6e 2c 67 47 |eMeValid|ation,gG|
|00000850| 72 61 70 68 69 63 73 48 | 65 61 70 53 69 7a 65 2e |raphicsH|eapSize.|
|00000860| 20 0d 20 2d 2d 09 09 09 | 09 53 65 65 20 74 68 65 | . --...|.See the|
|00000870| 20 63 6f 6d 6d 65 6e 74 | 73 20 66 6f 72 20 64 65 | comment|s for de|
|00000880| 74 61 69 6c 20 69 6e 20 | 74 68 69 73 20 66 69 6c |tail in |this fil|
|00000890| 65 2e 20 20 50 4c 41 0d | 20 2d 2d 0d 20 2d 2d 09 |e. PLA.| --. --.|
|000008a0| 09 36 2f 39 31 09 55 70 | 64 61 74 65 64 20 74 68 |.6/91.Up|dated th|
|000008b0| 65 20 73 68 65 6c 6c 20 | 74 6f 20 72 65 66 6c 65 |e shell |to refle|
|000008c0| 63 74 20 74 68 65 20 63 | 68 61 6e 67 65 73 20 69 |ct the c|hanges i|
|000008d0| 6e 20 22 47 72 61 70 68 | 69 63 73 22 20 76 31 2e |n "Graph|ics" v1.|
|000008e0| 30 64 32 31 2e 32 2e 20 | 20 50 4c 41 0d 20 2d 2d |0d21.2. | PLA. --|
|000008f0| 0d 20 2d 2d 09 09 33 2f | 39 30 09 4e 65 77 20 20 |. --..3/|90.New |
|00000900| 2d 20 50 4c 41 0d 20 2d | 2d 0d 20 2d 2d 0d 20 2d |- PLA. -|-. --. -|
|00000910| 2d 09 09 a9 20 41 70 70 | 6c 65 20 43 6f 6d 70 75 |-... App|le Compu|
|00000920| 74 65 72 2c 20 49 6e 63 | 2e 20 31 39 39 30 20 2d |ter, Inc|. 1990 -|
|00000930| 20 31 39 39 34 20 20 41 | 6c 6c 20 72 69 67 68 74 | 1994 A|ll right|
|00000940| 73 20 72 65 73 65 72 76 | 65 64 0d 20 2d 2d 09 09 |s reserv|ed. --..|
|00000950| 09 09 09 09 09 09 0d 2a | 2a 2f 0d 0d 23 69 6e 63 |.......*|*/..#inc|
|00000960| 6c 75 64 65 20 3c 44 65 | 73 6b 2e 68 3e 0d 23 69 |lude <De|sk.h>.#i|
|00000970| 6e 63 6c 75 64 65 20 3c | 45 76 65 6e 74 73 2e 68 |nclude <|Events.h|
|00000980| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 46 6f 6e 74 |>.#inclu|de <Font|
|00000990| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 57 |s.h>.#in|clude <W|
|000009a0| 69 6e 64 6f 77 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |indows.h|>.#inclu|
|000009b0| 64 65 20 3c 4d 65 6d 6f | 72 79 2e 68 3e 0d 23 69 |de <Memo|ry.h>.#i|
|000009c0| 6e 63 6c 75 64 65 20 3c | 54 6f 6f 6c 55 74 69 6c |nclude <|ToolUtil|
|000009d0| 73 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 51 |s.h>.#in|clude <Q|
|000009e0| 75 69 63 6b 64 72 61 77 | 2e 68 3e 0d 23 69 6e 63 |uickdraw|.h>.#inc|
|000009f0| 6c 75 64 65 20 3c 47 65 | 73 74 61 6c 74 45 71 75 |lude <Ge|staltEqu|
|00000a00| 2e 68 3e 0d 0d 23 69 6e | 63 6c 75 64 65 20 22 67 |.h>..#in|clude "g|
|00000a10| 72 61 70 68 69 63 73 20 | 74 6f 6f 6c 62 6f 78 2e |raphics |toolbox.|
|00000a20| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 67 72 61 |h".#incl|ude "gra|
|00000a30| 70 68 69 63 73 20 72 6f | 75 74 69 6e 65 73 2e 68 |phics ro|utines.h|
|00000a40| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 67 72 61 70 |".#inclu|de "grap|
|00000a50| 68 69 63 73 20 6d 61 63 | 69 6e 74 6f 73 68 2e 68 |hics mac|intosh.h|
|00000a60| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 67 72 61 70 |".#inclu|de "grap|
|00000a70| 68 69 63 73 20 6c 69 62 | 72 61 72 69 65 73 2e 68 |hics lib|raries.h|
|00000a80| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 67 72 61 70 |".#inclu|de "grap|
|00000a90| 68 69 63 73 20 64 65 62 | 75 67 67 69 6e 67 2e 68 |hics deb|ugging.h|
|00000aa0| 22 0d 0d 23 69 6e 63 6c | 75 64 65 20 22 67 72 61 |"..#incl|ude "gra|
|00000ab0| 70 68 69 63 73 20 73 68 | 65 6c 6c 2e 68 22 0d 0d |phics sh|ell.h"..|
|00000ac0| 23 64 65 66 69 6e 65 09 | 6b 4f 53 45 76 65 6e 74 |#define.|kOSEvent|
|00000ad0| 09 09 09 09 09 09 61 70 | 70 34 45 76 74 09 2f 2f |......ap|p4Evt.//|
|00000ae0| 20 65 76 65 6e 74 20 75 | 73 65 64 20 62 79 20 4d | event u|sed by M|
|00000af0| 75 6c 74 69 46 69 6e 64 | 65 72 0d 23 64 65 66 69 |ultiFind|er.#defi|
|00000b00| 6e 65 09 6b 53 75 73 70 | 65 6e 64 52 65 73 75 6d |ne.kSusp|endResum|
|00000b10| 65 4d 65 73 73 61 67 65 | 09 09 09 31 09 09 2f 2f |eMessage|...1..//|
|00000b20| 20 68 69 67 68 20 62 79 | 74 65 20 6f 66 20 73 75 | high by|te of su|
|00000b30| 73 70 65 6e 64 2f 72 65 | 73 75 6d 65 20 65 76 65 |spend/re|sume eve|
|00000b40| 6e 74 20 6d 65 73 73 61 | 67 65 0d 23 64 65 66 69 |nt messa|ge.#defi|
|00000b50| 6e 65 09 6b 52 65 73 75 | 6d 65 4d 61 73 6b 09 09 |ne.kResu|meMask..|
|00000b60| 09 09 09 09 31 09 09 2f | 2f 20 62 69 74 20 6f 66 |....1../|/ bit of|
|00000b70| 20 6d 65 73 73 61 67 65 | 20 66 69 65 6c 64 20 66 | message| field f|
|00000b80| 6f 72 20 72 65 73 75 6d | 65 20 76 73 2e 20 73 75 |or resum|e vs. su|
|00000b90| 73 70 65 6e 64 0d 0d 0d | 23 69 66 20 64 65 66 69 |spend...|#if defi|
|00000ba0| 6e 65 64 28 70 6f 77 65 | 72 63 29 20 7c 7c 20 64 |ned(powe|rc) || d|
|00000bb0| 65 66 69 6e 65 64 28 5f | 5f 70 6f 77 65 72 63 29 |efined(_|_powerc)|
|00000bc0| 0d 09 51 44 47 6c 6f 62 | 61 6c 73 09 71 64 3b 0d |..QDGlob|als.qd;.|
|00000bd0| 23 65 6e 64 69 66 0d 0d | 0d 57 69 6e 64 6f 77 50 |#endif..|.WindowP|
|00000be0| 74 72 20 09 09 67 57 69 | 6e 64 6f 77 2c 20 77 68 |tr ..gWi|ndow, wh|
|00000bf0| 69 63 68 57 69 6e 64 6f | 77 3b 0d 0d 45 76 65 6e |ichWindo|w;..Even|
|00000c00| 74 52 65 63 6f 72 64 09 | 09 67 74 68 65 45 76 65 |tRecord.|.gtheEve|
|00000c10| 6e 74 3b 0d 67 78 53 68 | 61 70 65 20 09 09 67 57 |nt;.gxSh|ape ..gW|
|00000c20| 69 6e 64 6f 77 42 6f 75 | 6e 64 73 53 68 61 70 65 |indowBou|ndsShape|
|00000c30| 3b 0d 67 78 56 69 65 77 | 50 6f 72 74 09 09 67 54 |;.gxView|Port..gT|
|00000c40| 68 65 57 69 6e 64 6f 77 | 73 56 69 65 77 50 6f 72 |heWindow|sViewPor|
|00000c50| 74 3b 09 0d 0d 2f 2a 2a | 2d 2d 2d 2d 2d 2d 20 46 |t;.../**|------ F|
|00000c60| 75 6e 63 74 69 6f 6e 20 | 50 72 6f 74 6f 74 79 70 |unction |Prototyp|
|00000c70| 65 73 20 2d 2d 2d 2d 2d | 2a 2a 2f 0d 76 6f 69 64 |es -----|**/.void|
|00000c80| 20 6d 61 69 6e 28 76 6f | 69 64 29 3b 0d 67 78 53 | main(vo|id);.gxS|
|00000c90| 68 61 70 65 20 47 65 74 | 57 69 6e 64 6f 77 42 6f |hape Get|WindowBo|
|00000ca0| 75 6e 64 73 53 68 61 70 | 65 28 76 6f 69 64 29 3b |undsShap|e(void);|
|00000cb0| 0d 42 6f 6f 6c 65 61 6e | 20 45 76 65 6e 74 4c 6f |.Boolean| EventLo|
|00000cc0| 6f 70 28 76 6f 69 64 29 | 3b 0d 76 6f 69 64 20 53 |op(void)|;.void S|
|00000cd0| 65 74 55 70 47 58 44 65 | 62 75 67 67 69 6e 67 57 |etUpGXDe|buggingW|
|00000ce0| 6f 72 6c 64 20 28 42 6f | 6f 6c 65 61 6e 20 47 58 |orld (Bo|olean GX|
|00000cf0| 44 65 62 75 67 67 69 6e | 67 49 6e 73 74 61 6c 6c |Debuggin|gInstall|
|00000d00| 65 64 29 3b 0d 0d 2f 2a | 2d 2d 2d 2d 2d 2d 20 6d |ed);../*|------ m|
|00000d10| 61 69 6e 20 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ain ----|--------|
|00000d20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2a 2f 0d |--------|-----*/.|
|00000d70| 0d 76 6f 69 64 20 6d 61 | 69 6e 28 29 0d 7b 09 09 |.void ma|in().{..|
|00000d80| 0d 09 43 75 72 73 48 61 | 6e 64 6c 65 09 09 09 74 |..CursHa|ndle...t|
|00000d90| 68 65 43 75 72 73 3b 20 | 0d 09 6c 6f 6e 67 09 09 |heCurs; |..long..|
|00000da0| 09 09 74 68 65 46 65 61 | 74 75 72 65 3b 0d 09 42 |..theFea|ture;..B|
|00000db0| 6f 6f 6c 65 61 6e 09 09 | 09 09 64 65 62 75 67 67 |oolean..|..debugg|
|00000dc0| 69 6e 67 49 6e 69 74 49 | 6e 73 74 61 6c 6c 65 64 |ingInitI|nstalled|
|00000dd0| 20 3d 20 66 61 6c 73 65 | 3b 0d 09 0d 09 2f 2f 0d | = false|;....//.|
|00000de0| 09 2f 2f 20 20 20 47 65 | 6e 65 72 69 63 20 68 65 |.// Ge|neric he|
|00000df0| 61 70 20 69 6e 69 74 69 | 61 6c 69 7a 61 74 69 6f |ap initi|alizatio|
|00000e00| 6e 2e 0d 09 2f 2f 0d 09 | 4d 61 78 41 70 70 6c 5a |n...//..|MaxApplZ|
|00000e10| 6f 6e 65 28 29 3b 20 0d | 09 4d 6f 72 65 4d 61 73 |one(); .|.MoreMas|
|00000e20| 74 65 72 73 28 29 3b 20 | 4d 6f 72 65 4d 61 73 74 |ters(); |MoreMast|
|00000e30| 65 72 73 28 29 3b 20 4d | 6f 72 65 4d 61 73 74 65 |ers(); M|oreMaste|
|00000e40| 72 73 28 29 3b 20 0d 09 | 4d 6f 72 65 4d 61 73 74 |rs(); ..|MoreMast|
|00000e50| 65 72 73 28 29 3b 20 4d | 6f 72 65 4d 61 73 74 65 |ers(); M|oreMaste|
|00000e60| 72 73 28 29 3b 20 4d 6f | 72 65 4d 61 73 74 65 72 |rs(); Mo|reMaster|
|00000e70| 73 28 29 3b 20 0d 0d 09 | 2f 2f 0d 09 2f 2f 20 20 |s(); ...|//..// |
|00000e80| 20 49 6e 69 74 69 61 6c | 69 7a 65 20 74 68 65 20 | Initial|ize the |
|00000e90| 74 6f 6f 6c 62 6f 78 20 | 0d 09 2f 2f 0d 20 09 49 |toolbox |..//. .I|
|00000ea0| 6e 69 74 47 72 61 66 28 | 26 71 64 2e 74 68 65 50 |nitGraf(|&qd.theP|
|00000eb0| 6f 72 74 29 3b 0d 09 49 | 6e 69 74 46 6f 6e 74 73 |ort);..I|nitFonts|
|00000ec0| 28 29 3b 0d 09 49 6e 69 | 74 57 69 6e 64 6f 77 73 |();..Ini|tWindows|
|00000ed0| 28 29 3b 0d 09 49 6e 69 | 74 43 75 72 73 6f 72 28 |();..Ini|tCursor(|
|00000ee0| 29 3b 0d 0d 09 74 68 65 | 43 75 72 73 20 3d 20 47 |);...the|Curs = G|
|00000ef0| 65 74 43 75 72 73 6f 72 | 28 77 61 74 63 68 43 75 |etCursor|(watchCu|
|00000f00| 72 73 6f 72 29 3b 0d 09 | 53 65 74 43 75 72 73 6f |rsor);..|SetCurso|
|00000f10| 72 28 2a 74 68 65 43 75 | 72 73 29 3b 0d 0d 09 2f |r(*theCu|rs);.../|
|00000f20| 2f 0d 09 2f 2f 09 43 68 | 65 63 6b 20 74 6f 20 73 |/..//.Ch|eck to s|
|00000f30| 65 65 20 69 66 20 51 75 | 69 63 6b 44 72 61 77 20 |ee if Qu|ickDraw |
|00000f40| 47 58 20 69 73 20 69 6e | 73 74 61 6c 6c 65 64 2e |GX is in|stalled.|
|00000f50| 20 49 66 20 6e 6f 74 2c | 20 61 6c 65 72 74 20 74 | If not,| alert t|
|00000f60| 68 65 20 75 73 65 72 2e | 2e 2e 0d 09 2f 2f 0d 09 |he user.|....//..|
|00000f70| 69 66 20 28 20 28 47 65 | 73 74 61 6c 74 28 67 65 |if ( (Ge|stalt(ge|
|00000f80| 73 74 61 6c 74 47 72 61 | 70 68 69 63 73 56 65 72 |staltGra|phicsVer|
|00000f90| 73 69 6f 6e 2c 20 26 74 | 68 65 46 65 61 74 75 72 |sion, &t|heFeatur|
|00000fa0| 65 29 20 3d 3d 20 6e 6f | 45 72 72 29 20 29 0d 09 |e) == no|Err) )..|
|00000fb0| 7b 0d 09 09 67 78 47 72 | 61 70 68 69 63 73 43 6c |{...gxGr|aphicsCl|
|00000fc0| 69 65 6e 74 20 09 6e 65 | 77 43 6c 69 65 6e 74 3b |ient .ne|wClient;|
|00000fd0| 0d 09 09 0d 09 09 2f 2f | 0d 09 09 2f 2f 09 54 68 |......//|...//.Th|
|00000fe0| 65 20 47 58 20 67 65 73 | 74 61 6c 74 47 72 61 70 |e GX ges|taltGrap|
|00000ff0| 68 69 63 73 41 74 74 72 | 20 47 65 73 74 61 6c 74 |hicsAttr| Gestalt|
|00001000| 20 61 74 74 72 69 62 75 | 74 65 20 63 61 6e 20 62 | attribu|te can b|
|00001010| 65 20 75 73 65 64 20 74 | 6f 20 64 65 74 65 72 6d |e used t|o determ|
|00001020| 69 6e 65 20 69 66 3a 0d | 09 09 2f 2f 09 74 68 65 |ine if:.|..//.the|
|00001030| 20 67 72 61 70 68 69 63 | 73 20 70 69 65 63 65 20 | graphic|s piece |
|00001040| 6f 66 20 47 58 20 68 61 | 73 20 62 65 65 6e 20 6c |of GX ha|s been l|
|00001050| 6f 61 64 65 64 2c 20 74 | 68 65 20 47 58 20 64 65 |oaded, t|he GX de|
|00001060| 62 75 67 67 69 6e 67 20 | 69 6e 69 74 20 69 73 20 |bugging |init is |
|00001070| 69 6e 73 74 61 6c 6c 65 | 64 2c 20 6f 72 0d 09 09 |installe|d, or...|
|00001080| 2f 2f 09 79 6f 75 72 20 | 61 72 65 20 72 75 6e 6e |//.your |are runn|
|00001090| 69 6e 67 20 74 68 65 20 | 50 6f 77 65 72 50 43 20 |ing the |PowerPC |
|000010a0| 76 65 72 73 69 6f 6e 2e | 20 0d 09 09 2f 2f 0d 09 |version.| ...//..|
|000010b0| 09 2f 2f 09 49 6e 20 6f | 75 72 20 63 61 73 65 2c |.//.In o|ur case,|
|000010c0| 20 77 65 20 6f 6e 6c 79 | 20 6e 65 65 64 20 74 6f | we only| need to|
|000010d0| 20 6b 6e 6f 77 20 69 66 | 20 74 68 65 20 64 65 62 | know if| the deb|
|000010e0| 75 67 67 69 6e 67 20 69 | 6e 69 74 20 77 61 73 20 |ugging i|nit was |
|000010f0| 69 6e 73 74 61 6c 6c 65 | 64 2e 20 49 66 20 69 74 |installe|d. If it|
|00001100| 20 69 73 2c 0d 09 09 2f | 2f 09 77 65 20 77 69 6c | is,.../|/.we wil|
|00001110| 6c 20 65 6e 61 62 6c 65 | 20 74 68 65 20 47 58 20 |l enable| the GX |
|00001120| 76 61 6c 69 64 61 74 69 | 6f 6e 20 61 6e 64 20 6e |validati|on and n|
|00001130| 6f 74 69 63 65 20 68 61 | 6e 64 6c 69 6e 67 20 66 |otice ha|ndling f|
|00001140| 65 61 74 75 72 65 73 2e | 57 65 20 64 65 66 69 6e |eatures.|We defin|
|00001150| 65 20 0d 09 09 2f 2f 09 | 64 65 62 75 67 67 69 6e |e ...//.|debuggin|
|00001160| 67 49 6e 69 74 49 6e 73 | 74 61 6c 6c 65 64 20 61 |gInitIns|talled a|
|00001170| 73 20 74 72 75 65 20 74 | 6f 20 65 6e 61 62 6c 65 |s true t|o enable|
|00001180| 20 47 58 20 76 61 6c 69 | 64 61 74 69 6f 6e 20 61 | GX vali|dation a|
|00001190| 6e 64 20 6e 6f 74 69 63 | 65 20 68 61 6e 64 6c 65 |nd notic|e handle|
|000011a0| 72 0d 09 09 2f 2f 20 20 | 77 69 74 68 69 6e 20 74 |r...// |within t|
|000011b0| 68 65 20 53 65 74 55 70 | 47 58 44 65 62 75 67 67 |he SetUp|GXDebugg|
|000011c0| 69 6e 67 57 6f 72 6c 64 | 20 66 75 6e 63 74 69 6f |ingWorld| functio|
|000011d0| 6e 2e 0d 09 09 2f 2f 0d | 09 09 69 66 20 28 20 28 |n....//.|..if ( (|
|000011e0| 47 65 73 74 61 6c 74 28 | 67 65 73 74 61 6c 74 47 |Gestalt(|gestaltG|
|000011f0| 72 61 70 68 69 63 73 41 | 74 74 72 2c 20 26 74 68 |raphicsA|ttr, &th|
|00001200| 65 46 65 61 74 75 72 65 | 29 20 3d 3d 20 6e 6f 45 |eFeature|) == noE|
|00001210| 72 72 29 20 29 0d 09 09 | 20 20 69 66 20 28 20 28 |rr) )...| if ( (|
|00001220| 74 68 65 46 65 61 74 75 | 72 65 20 26 20 67 65 73 |theFeatu|re & ges|
|00001230| 74 61 6c 74 47 72 61 70 | 68 69 63 73 49 73 44 65 |taltGrap|hicsIsDe|
|00001240| 62 75 67 67 69 6e 67 29 | 20 3d 3d 20 67 65 73 74 |bugging)| == gest|
|00001250| 61 6c 74 47 72 61 70 68 | 69 63 73 49 73 44 65 62 |altGraph|icsIsDeb|
|00001260| 75 67 67 69 6e 67 20 29 | 20 0d 09 09 09 20 64 65 |ugging )| .... de|
|00001270| 62 75 67 67 69 6e 67 49 | 6e 69 74 49 6e 73 74 61 |buggingI|nitInsta|
|00001280| 6c 6c 65 64 20 3d 20 74 | 72 75 65 3b 0d 09 0d 0d |lled = t|rue;....|
|00001290| 09 09 6e 65 77 43 6c 69 | 65 6e 74 20 3d 20 47 58 |..newCli|ent = GX|
|000012a0| 4e 65 77 47 72 61 70 68 | 69 63 73 43 6c 69 65 6e |NewGraph|icsClien|
|000012b0| 74 28 6e 69 6c 2c 20 67 | 47 72 61 70 68 69 63 73 |t(nil, g|Graphics|
|000012c0| 48 65 61 70 53 69 7a 65 | 20 2a 20 31 30 32 34 2c |HeapSize| * 1024,|
|000012d0| 20 30 4c 29 3b 0d 0d 09 | 09 2f 2f 0d 09 09 2f 2f | 0L);...|.//...//|
|000012e0| 09 41 66 74 65 72 20 77 | 65 20 61 74 74 65 6d 70 |.After w|e attemp|
|000012f0| 74 65 64 20 74 6f 20 63 | 72 65 61 74 65 20 74 68 |ted to c|reate th|
|00001300| 65 20 67 72 61 70 68 69 | 63 73 20 63 6c 69 65 6e |e graphi|cs clien|
|00001310| 74 2c 20 77 65 20 6e 65 | 65 64 20 74 6f 20 64 65 |t, we ne|ed to de|
|00001320| 74 65 72 6d 69 6e 65 20 | 69 66 20 74 68 65 20 63 |termine |if the c|
|00001330| 61 6c 6c 0d 09 09 2f 2f | 20 20 73 75 63 63 65 65 |all...//| succee|
|00001340| 64 65 64 2e 20 49 66 20 | 74 68 65 20 63 61 6c 6c |ded. If |the call|
|00001350| 20 64 69 64 20 6e 6f 74 | 20 28 61 73 20 69 6e 20 | did not| (as in |
|00001360| 74 68 65 20 63 61 73 65 | 20 66 6f 72 20 61 6c 6c |the case| for all|
|00001370| 20 47 58 20 66 75 6e 63 | 74 69 6f 6e 73 29 2c 20 | GX func|tions), |
|00001380| 22 6e 65 77 43 6c 69 65 | 6e 74 22 20 77 69 6c 6c |"newClie|nt" will|
|00001390| 0d 09 09 2f 2f 09 62 65 | 20 6e 69 6c 2e 20 49 66 |...//.be| nil. If|
|000013a0| 20 69 74 20 69 73 2c 20 | 77 65 20 61 6c 65 72 74 | it is, |we alert|
|000013b0| 20 74 68 65 20 75 73 65 | 72 20 74 6f 20 74 68 65 | the use|r to the|
|000013c0| 20 70 72 6f 62 6c 65 6d | 2e 20 4f 74 68 65 72 77 | problem|. Otherw|
|000013d0| 69 73 65 2c 20 77 65 20 | 77 69 6c 6c 20 61 74 74 |ise, we |will att|
|000013e0| 65 6d 70 74 65 64 20 74 | 6f 20 0d 09 09 2f 2f 09 |empted t|o ...//.|
|000013f0| 61 6c 6c 6f 63 61 74 65 | 20 74 68 65 20 47 58 20 |allocate| the GX |
|00001400| 68 65 61 70 20 62 65 6c | 6f 77 2e 2e 2e 0d 09 09 |heap bel|ow......|
|00001410| 2f 2f 09 09 0d 09 09 69 | 66 20 28 20 6e 65 77 43 |//.....i|f ( newC|
|00001420| 6c 69 65 6e 74 20 29 20 | 0d 09 09 7b 0d 09 09 09 |lient ) |...{....|
|00001430| 2f 2f 0d 09 09 09 2f 2f | 09 49 6e 69 74 69 61 6c |//....//|.Initial|
|00001440| 69 7a 65 20 74 68 65 20 | 6e 65 77 20 67 72 61 70 |ize the |new grap|
|00001450| 68 69 63 73 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |hics env|ironment|
|00001460| 20 61 6e 64 20 63 72 65 | 61 74 65 20 74 68 65 20 | and cre|ate the |
|00001470| 47 58 20 68 65 61 70 2e | 0d 09 09 09 2f 2f 0d 09 |GX heap.|....//..|
|00001480| 09 09 47 58 45 6e 74 65 | 72 47 72 61 70 68 69 63 |..GXEnte|rGraphic|
|00001490| 73 28 29 3b 0d 0d 09 09 | 09 2f 2f 0d 09 09 09 2f |s();....|.//..../|
|000014a0| 2f 09 43 61 6c 6c 69 6e | 67 20 47 58 45 6e 74 65 |/.Callin|g GXEnte|
|000014b0| 72 47 72 61 70 68 69 63 | 73 20 61 6c 6c 6f 63 61 |rGraphic|s alloca|
|000014c0| 74 65 73 20 74 68 65 20 | 6d 65 6d 6f 72 79 20 77 |tes the |memory w|
|000014d0| 69 74 68 69 6e 20 74 68 | 65 20 47 58 20 68 65 61 |ithin th|e GX hea|
|000014e0| 70 2e 20 54 68 65 20 6f | 6e 6c 79 20 72 65 61 73 |p. The o|nly reas|
|000014f0| 6f 6e 20 74 68 65 0d 09 | 09 09 2f 2f 20 20 63 61 |on the..|..// ca|
|00001500| 6c 6c 20 77 6f 75 6c 64 | 20 6e 6f 74 20 73 75 63 |ll would| not suc|
|00001510| 63 65 65 64 20 69 73 20 | 69 66 20 74 68 65 72 65 |ceed is |if there|
|00001520| 20 69 73 20 6e 6f 74 20 | 65 6e 6f 75 67 68 20 6d | is not |enough m|
|00001530| 65 6d 6f 72 79 2e 20 49 | 6e 20 74 68 69 73 20 63 |emory. I|n this c|
|00001540| 61 73 65 2c 20 74 68 65 | 20 67 72 61 70 68 69 63 |ase, the| graphic|
|00001550| 73 20 0d 09 09 09 2f 2f | 20 20 65 72 72 6f 72 20 |s ....//| error |
|00001560| 77 68 69 63 68 20 77 69 | 6c 6c 20 62 65 20 70 6f |which wi|ll be po|
|00001570| 73 74 65 64 20 69 73 20 | 2d 32 37 39 39 39 20 28 |sted is |-27999 (|
|00001580| 6f 75 74 20 6f 66 20 6d | 65 6d 6f 72 79 29 2e 20 |out of m|emory). |
|00001590| 41 74 20 74 68 69 73 20 | 70 6f 69 6e 74 2c 20 77 |At this |point, w|
|000015a0| 65 20 68 61 76 65 20 6e | 6f 74 20 0d 09 09 09 2f |e have n|ot ..../|
|000015b0| 2f 09 69 6e 73 74 61 6c | 6c 65 64 20 61 6e 20 65 |/.instal|led an e|
|000015c0| 72 72 6f 72 20 68 61 6e | 64 6c 65 72 2c 20 73 6f |rror han|dler, so|
|000015d0| 20 77 65 20 63 68 65 63 | 6b 20 66 6f 72 20 74 68 | we chec|k for th|
|000015e0| 65 20 65 72 72 6f 72 20 | 6e 75 6d 62 65 72 20 63 |e error |number c|
|000015f0| 6f 72 72 65 73 70 6f 6e | 64 69 6e 67 20 74 6f 20 |orrespon|ding to |
|00001600| 74 68 65 20 0d 09 09 09 | 2f 2f 20 20 6f 75 74 20 |the ....|// out |
|00001610| 6f 66 20 6d 65 6d 6f 72 | 79 20 65 72 72 6f 72 2e |of memor|y error.|
|00001620| 0d 09 09 09 2f 2f 0d 09 | 09 09 69 66 20 28 20 47 |....//..|..if ( G|
|00001630| 58 47 65 74 47 72 61 70 | 68 69 63 73 45 72 72 6f |XGetGrap|hicsErro|
|00001640| 72 28 20 6e 69 6c 20 29 | 20 21 3d 20 2d 32 37 39 |r( nil )| != -279|
|00001650| 39 39 20 29 20 0d 09 09 | 09 7b 0d 09 09 09 09 53 |99 ) ...|.{.....S|
|00001660| 65 74 55 70 47 58 44 65 | 62 75 67 67 69 6e 67 57 |etUpGXDe|buggingW|
|00001670| 6f 72 6c 64 20 28 64 65 | 62 75 67 67 69 6e 67 49 |orld (de|buggingI|
|00001680| 6e 69 74 49 6e 73 74 61 | 6c 6c 65 64 29 3b 0d 20 |nitInsta|lled);. |
|00001690| 0d 09 09 09 09 2f 2f 0d | 09 09 09 09 2f 2f 09 43 |.....//.|....//.C|
|000016a0| 72 65 61 74 65 20 61 20 | 77 69 6e 64 6f 77 20 61 |reate a |window a|
|000016b0| 6e 64 20 61 74 74 61 63 | 68 20 61 20 47 58 20 76 |nd attac|h a GX v|
|000016c0| 69 65 77 50 6f 72 74 20 | 74 6f 20 69 74 2e 20 42 |iewPort |to it. B|
|000016d0| 79 20 61 74 74 61 63 68 | 69 6e 67 20 74 68 65 20 |y attach|ing the |
|000016e0| 76 69 65 77 50 6f 72 74 | 20 74 6f 20 0d 09 09 09 |viewPort| to ....|
|000016f0| 09 2f 2f 09 74 68 65 20 | 77 69 6e 64 6f 77 20 77 |.//.the |window w|
|00001700| 69 6c 6c 20 6d 61 6b 65 | 20 73 75 72 65 20 74 68 |ill make| sure th|
|00001710| 61 74 20 77 68 65 6e 20 | 61 20 75 73 65 72 20 6d |at when |a user m|
|00001720| 6f 76 65 73 20 6f 72 20 | 72 65 73 69 7a 65 73 20 |oves or |resizes |
|00001730| 74 68 65 20 77 69 6e 64 | 6f 77 20 61 6c 6c 20 6f |the wind|ow all o|
|00001740| 66 0d 09 09 09 09 2f 2f | 09 74 68 65 20 47 58 20 |f.....//|.the GX |
|00001750| 64 72 61 77 69 6e 67 20 | 77 69 6c 6c 20 6f 63 63 |drawing |will occ|
|00001760| 75 72 20 77 69 74 68 69 | 6e 20 77 69 6e 64 6f 77 |ur withi|n window|
|00001770| 2e 20 0d 09 09 09 09 2f | 2f 0d 09 09 09 09 2f 2f |. ...../|/.....//|
|00001780| 09 42 79 20 74 68 65 20 | 77 61 79 2c 20 79 6f 75 |.By the |way, you|
|00001790| 20 63 61 6e 6e 6f 74 20 | 64 69 72 65 63 74 6c 79 | cannot |directly|
|000017a0| 20 6d 61 6e 69 70 75 6c | 61 74 65 20 74 68 65 20 | manipul|ate the |
|000017b0| 70 61 72 65 6e 74 20 76 | 69 65 77 50 6f 72 74 20 |parent v|iewPort |
|000017c0| 61 74 74 61 63 68 65 64 | 20 74 6f 20 74 68 65 0d |attached| to the.|
|000017d0| 09 09 09 09 2f 2f 09 77 | 69 6e 64 6f 77 2c 20 79 |....//.w|indow, y|
|000017e0| 6f 75 20 77 69 6c 6c 20 | 72 65 63 69 65 76 65 20 |ou will |recieve |
|000017f0| 61 20 67 72 61 70 68 69 | 63 73 20 65 72 72 6f 72 |a graphi|cs error|
|00001800| 2e 20 54 68 69 73 20 76 | 69 65 77 50 6f 72 74 20 |. This v|iewPort |
|00001810| 63 61 6e 20 6f 6e 6c 79 | 20 62 65 20 6d 61 6e 69 |can only| be mani|
|00001820| 70 75 6c 61 74 65 64 0d | 09 09 09 09 2f 2f 20 20 |pulated.|....// |
|00001830| 62 79 20 74 68 65 20 47 | 58 20 73 79 73 74 65 6d |by the G|X system|
|00001840| 2e 20 49 66 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |. If you| want to|
|00001850| 20 6d 61 6e 69 70 75 6c | 61 74 65 20 61 20 76 69 | manipul|ate a vi|
|00001860| 65 77 50 6f 72 74 20 61 | 74 74 61 63 68 65 64 20 |ewPort a|ttached |
|00001870| 74 6f 20 61 20 77 69 6e | 64 6f 77 2c 20 69 74 0d |to a win|dow, it.|
|00001880| 09 09 09 09 2f 2f 09 20 | 5f 6d 75 73 74 5f 20 62 |....//. |_must_ b|
|00001890| 65 20 61 20 63 68 69 6c | 64 20 76 69 65 77 50 6f |e a chil|d viewPo|
|000018a0| 72 74 20 61 74 74 61 63 | 68 65 64 20 74 6f 20 74 |rt attac|hed to t|
|000018b0| 68 65 20 74 68 65 20 70 | 61 72 65 6e 74 20 76 69 |he the p|arent vi|
|000018c0| 65 77 50 6f 72 74 20 61 | 74 74 61 63 68 65 64 20 |ewPort a|ttached |
|000018d0| 74 6f 20 74 68 65 0d 09 | 09 09 09 2f 2f 09 77 69 |to the..|...//.wi|
|000018e0| 6e 64 6f 77 2e 0d 09 09 | 09 09 2f 2f 0d 09 09 09 |ndow....|..//....|
|000018f0| 09 67 57 69 6e 64 6f 77 | 20 3d 20 4e 65 77 57 69 |.gWindow| = NewWi|
|00001900| 6e 64 6f 77 28 6e 69 6c | 2c 20 26 67 57 69 6e 64 |ndow(nil|, &gWind|
|00001910| 6f 77 51 44 52 65 63 74 | 2c 20 67 57 69 6e 64 6f |owQDRect|, gWindo|
|00001920| 77 54 69 74 6c 65 2c 20 | 74 72 75 65 2c 20 6e 6f |wTitle, |true, no|
|00001930| 47 72 6f 77 44 6f 63 50 | 72 6f 63 2c 0d 09 09 09 |GrowDocP|roc,....|
|00001940| 09 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001950| 20 20 20 20 28 57 69 6e | 64 6f 77 50 74 72 29 2d | (Win|dowPtr)-|
|00001960| 31 4c 2c 20 74 72 75 65 | 2c 20 30 4c 29 3b 0d 09 |1L, true|, 0L);..|
|00001970| 09 09 09 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |... | |
|00001980| 20 20 20 20 20 20 0d 09 | 09 09 09 67 54 68 65 57 | ..|...gTheW|
|00001990| 69 6e 64 6f 77 73 56 69 | 65 77 50 6f 72 74 20 3d |indowsVi|ewPort =|
|000019a0| 20 47 58 4e 65 77 57 69 | 6e 64 6f 77 56 69 65 77 | GXNewWi|ndowView|
|000019b0| 50 6f 72 74 28 67 57 69 | 6e 64 6f 77 29 3b 0d 0d |Port(gWi|ndow);..|
|000019c0| 09 09 09 09 47 58 49 67 | 6e 6f 72 65 47 72 61 70 |....GXIg|noreGrap|
|000019d0| 68 69 63 73 4e 6f 74 69 | 63 65 28 74 72 61 6e 73 |hicsNoti|ce(trans|
|000019e0| 66 6f 72 6d 5f 61 6c 72 | 65 61 64 79 5f 73 65 74 |form_alr|eady_set|
|000019f0| 29 3b 0d 09 09 09 09 53 | 65 74 44 65 66 61 75 6c |);.....S|etDefaul|
|00001a00| 74 56 69 65 77 50 6f 72 | 74 28 67 54 68 65 57 69 |tViewPor|t(gTheWi|
|00001a10| 6e 64 6f 77 73 56 69 65 | 77 50 6f 72 74 29 3b 0d |ndowsVie|wPort);.|
|00001a20| 09 09 09 09 47 58 50 6f | 70 47 72 61 70 68 69 63 |....GXPo|pGraphic|
|00001a30| 73 4e 6f 74 69 63 65 28 | 29 3b 0d 0d 09 09 09 09 |sNotice(|);......|
|00001a40| 2f 2f 0d 09 09 09 09 2f | 2f 20 20 47 65 74 20 74 |//...../|/ Get t|
|00001a50| 68 65 20 67 6c 6f 62 61 | 6c 20 62 6f 75 6e 64 73 |he globa|l bounds|
|00001a60| 20 6f 66 20 74 68 65 20 | 77 69 6e 64 6f 77 2e 0d | of the |window..|
|00001a70| 09 09 09 09 2f 2f 0d 09 | 09 09 09 67 57 69 6e 64 |....//..|...gWind|
|00001a80| 6f 77 42 6f 75 6e 64 73 | 53 68 61 70 65 20 3d 20 |owBounds|Shape = |
|00001a90| 47 65 74 57 69 6e 64 6f | 77 42 6f 75 6e 64 73 53 |GetWindo|wBoundsS|
|00001aa0| 68 61 70 65 28 29 3b 0d | 0d 20 09 09 09 09 2f 2f |hape();.|. ....//|
|00001ab0| 0d 20 09 09 09 09 2f 2f | 09 43 72 65 61 74 65 20 |. ....//|.Create |
|00001ac0| 74 68 65 20 47 58 20 73 | 68 61 70 65 73 20 77 65 |the GX s|hapes we|
|00001ad0| 20 61 72 65 20 67 6f 69 | 6e 67 20 74 6f 20 64 72 | are goi|ng to dr|
|00001ae0| 61 77 20 74 6f 20 74 68 | 65 20 77 69 6e 64 6f 77 |aw to th|e window|
|00001af0| 2e 20 0d 20 09 09 09 09 | 2f 2f 0d 20 09 09 09 09 |. . ....|//. ....|
|00001b00| 44 6f 49 6e 69 74 69 61 | 6c 69 7a 61 74 69 6f 6e |DoInitia|lization|
|00001b10| 28 67 57 69 6e 64 6f 77 | 29 3b 0d 0d 09 09 09 09 |(gWindow|);......|
|00001b20| 53 65 74 43 75 72 73 6f | 72 28 26 71 64 2e 61 72 |SetCurso|r(&qd.ar|
|00001b30| 72 6f 77 29 3b 20 20 0d | 09 0d 09 09 09 09 77 68 |row); .|......wh|
|00001b40| 69 6c 65 20 28 45 76 65 | 6e 74 4c 6f 6f 70 28 29 |ile (Eve|ntLoop()|
|00001b50| 29 0d 09 09 20 20 09 09 | 09 44 6f 49 64 6c 65 28 |)... ..|.DoIdle(|
|00001b60| 67 57 69 6e 64 6f 77 29 | 3b 20 20 20 2f 2f 20 6c |gWindow)|; // l|
|00001b70| 6f 6f 70 20 75 6e 74 69 | 6c 20 74 68 65 20 77 69 |oop unti|l the wi|
|00001b80| 6e 64 6f 77 20 69 73 20 | 63 6c 6f 73 65 64 0d 0d |ndow is |closed..|
|00001b90| 09 09 09 09 44 6f 44 69 | 73 70 6f 73 65 28 67 57 |....DoDi|spose(gW|
|00001ba0| 69 6e 64 6f 77 29 3b 0d | 09 0d 09 09 09 09 47 58 |indow);.|......GX|
|00001bb0| 45 78 69 74 47 72 61 70 | 68 69 63 73 28 29 3b 09 |ExitGrap|hics();.|
|00001bc0| 20 2f 2f 20 44 65 61 6c | 6c 6f 63 61 74 65 20 61 | // Deal|locate a|
|00001bd0| 6c 6c 20 6f 66 20 74 68 | 65 20 64 65 66 61 75 6c |ll of th|e defaul|
|00001be0| 74 20 73 74 72 75 63 74 | 75 72 65 73 0d 09 09 09 |t struct|ures....|
|00001bf0| 09 47 58 44 69 73 70 6f | 73 65 47 72 61 70 68 69 |.GXDispo|seGraphi|
|00001c00| 63 73 43 6c 69 65 6e 74 | 28 6e 65 77 43 6c 69 65 |csClient|(newClie|
|00001c10| 6e 74 29 3b 0d 09 09 0d | 09 09 09 7d 20 65 6c 73 |nt);....|...} els|
|00001c20| 65 20 7b 0d 09 09 09 09 | 2f 2f 0d 09 09 09 09 2f |e {.....|//...../|
|00001c30| 2f 20 09 53 69 6e 63 65 | 2c 20 77 65 20 63 61 6e |/ .Since|, we can|
|00001c40| 20 6e 6f 74 20 61 6c 6c | 6f 63 61 74 65 20 74 68 | not all|ocate th|
|00001c50| 65 20 72 65 71 75 65 73 | 74 65 64 20 73 69 7a 65 |e reques|ted size|
|00001c60| 20 66 6f 72 20 6f 75 72 | 20 47 58 20 68 65 61 70 | for our| GX heap|
|00001c70| 2c 20 77 65 20 6e 65 65 | 64 20 74 6f 20 74 68 72 |, we nee|d to thr|
|00001c80| 6f 77 0d 09 09 09 09 2f | 2f 20 20 61 77 61 79 20 |ow...../|/ away |
|00001c90| 74 68 65 20 63 6c 69 65 | 6e 74 20 77 65 20 63 72 |the clie|nt we cr|
|00001ca0| 65 61 74 65 64 20 61 6e | 64 20 61 6c 65 72 74 20 |eated an|d alert |
|00001cb0| 74 68 65 20 75 73 65 72 | 20 74 68 61 74 20 74 68 |the user| that th|
|00001cc0| 65 72 65 20 69 73 20 6e | 6f 74 20 65 6e 6f 75 67 |ere is n|ot enoug|
|00001cd0| 68 20 6d 65 6d 6f 72 79 | 20 74 6f 0d 09 09 09 09 |h memory| to.....|
|00001ce0| 2f 2f 20 20 63 6f 6e 74 | 69 6e 75 65 2e 0d 09 09 |// cont|inue....|
|00001cf0| 09 09 2f 2f 0d 09 09 09 | 09 2f 2f 09 48 6f 77 65 |..//....|.//.Howe|
|00001d00| 76 65 72 2c 20 79 6f 75 | 20 63 6f 75 6c 64 20 74 |ver, you| could t|
|00001d10| 72 79 20 74 6f 20 63 72 | 65 61 74 65 20 61 20 73 |ry to cr|eate a s|
|00001d20| 6d 61 6c 6c 65 72 20 47 | 58 20 68 65 61 70 2e 20 |maller G|X heap. |
|00001d30| 49 66 20 79 6f 75 20 64 | 65 63 69 64 65 20 74 6f |If you d|ecide to|
|00001d40| 20 74 72 79 20 74 6f 20 | 63 72 65 61 74 65 0d 09 | try to |create..|
|00001d50| 09 09 09 2f 2f 20 09 61 | 20 73 6d 61 6c 6c 65 72 |...// .a| smaller|
|00001d60| 20 47 58 20 68 65 61 70 | 20 77 68 69 63 68 20 77 | GX heap| which w|
|00001d70| 6f 75 6c 64 20 6d 65 65 | 74 20 74 68 65 20 6e 65 |ould mee|t the ne|
|00001d80| 65 64 73 20 6f 66 20 79 | 6f 75 72 20 61 70 70 6c |eds of y|our appl|
|00001d90| 69 63 61 74 69 6f 6e 2c | 20 79 6f 75 20 6e 65 65 |ication,| you nee|
|00001da0| 64 20 74 6f 20 0d 09 09 | 09 09 2f 2f 20 09 64 69 |d to ...|..// .di|
|00001db0| 73 70 6f 73 65 20 6f 66 | 20 74 68 65 20 63 6c 69 |spose of| the cli|
|00001dc0| 65 6e 74 20 79 6f 75 20 | 68 61 64 20 6f 72 69 67 |ent you |had orig|
|00001dd0| 69 6e 61 6c 6c 79 20 63 | 72 65 61 74 65 64 2e 20 |inally c|reated. |
|00001de0| 57 68 79 3f 20 54 68 65 | 20 6f 72 69 67 69 6e 61 |Why? The| origina|
|00001df0| 6c 20 63 6c 69 65 6e 74 | 20 0d 09 09 09 09 2f 2f |l client| .....//|
|00001e00| 09 63 6f 6e 74 61 69 6e | 73 20 74 68 65 20 47 58 |.contain|s the GX|
|00001e10| 20 68 65 61 70 20 73 69 | 7a 65 20 72 65 71 75 65 | heap si|ze reque|
|00001e20| 73 74 65 64 2c 20 77 68 | 69 63 68 20 77 61 73 20 |sted, wh|ich was |
|00001e30| 74 6f 6f 20 62 69 67 2c | 20 74 68 65 72 65 66 6f |too big,| therefo|
|00001e40| 72 65 20 79 6f 75 20 6e | 65 65 64 20 74 6f 20 0d |re you n|eed to .|
|00001e50| 09 09 09 09 2f 2f 09 64 | 69 73 70 6f 73 65 20 6f |....//.d|ispose o|
|00001e60| 66 20 69 74 20 61 6e 64 | 20 63 72 65 61 74 65 20 |f it and| create |
|00001e70| 61 20 63 6c 69 65 6e 74 | 20 72 65 71 75 65 73 74 |a client| request|
|00001e80| 69 6e 67 20 61 20 73 6d | 61 6c 6c 65 72 20 73 69 |ing a sm|aller si|
|00001e90| 7a 65 20 61 6e 64 20 63 | 61 6c 6c 20 47 58 45 6e |ze and c|all GXEn|
|00001ea0| 74 65 72 47 72 61 70 68 | 69 63 73 0d 09 09 09 09 |terGraph|ics.....|
|00001eb0| 2f 2f 20 09 61 6e 64 20 | 63 68 65 63 6b 20 66 6f |// .and |check fo|
|00001ec0| 72 20 61 6e 20 65 72 72 | 6f 72 2e 20 0d 09 09 09 |r an err|or. ....|
|00001ed0| 09 2f 2f 0d 09 09 09 09 | 47 58 44 69 73 70 6f 73 |.//.....|GXDispos|
|00001ee0| 65 47 72 61 70 68 69 63 | 73 43 6c 69 65 6e 74 28 |eGraphic|sClient(|
|00001ef0| 20 6e 65 77 43 6c 69 65 | 6e 74 20 29 3b 0d 09 09 | newClie|nt );...|
|00001f00| 09 09 44 65 62 75 67 53 | 74 72 20 28 22 5c 70 20 |..DebugS|tr ("\p |
|00001f10| 55 6e 66 6f 72 74 75 6e | 61 74 65 6c 79 2c 20 74 |Unfortun|ately, t|
|00001f20| 68 65 72 65 20 69 73 20 | 6e 6f 74 20 65 6e 6f 75 |here is |not enou|
|00001f30| 67 68 20 6d 65 6d 6f 72 | 79 20 66 6f 72 20 47 58 |gh memor|y for GX|
|00001f40| 2c 20 70 6c 65 61 73 65 | 20 71 75 69 74 20 61 6e |, please| quit an|
|00001f50| 20 61 70 70 2e 2e 2e 22 | 29 3b 0d 09 09 20 20 20 | app..."|);... |
|00001f60| 20 7d 0d 09 09 20 20 7d | 0d 0d 09 7d 20 65 6c 73 | }... }|...} els|
|00001f70| 65 20 44 65 62 75 67 53 | 74 72 20 28 22 5c 70 20 |e DebugS|tr ("\p |
|00001f80| 55 6e 66 6f 72 74 75 6e | 61 74 65 6c 79 2c 20 79 |Unfortun|ately, y|
|00001f90| 6f 75 20 68 61 76 65 20 | 6e 6f 74 20 69 6e 73 74 |ou have |not inst|
|00001fa0| 61 6c 6c 65 64 20 51 75 | 69 63 6b 44 72 61 77 20 |alled Qu|ickDraw |
|00001fb0| 47 58 2c 20 49 20 63 61 | 6e 27 74 20 72 75 6e 20 |GX, I ca|n't run |
|00001fc0| 77 69 74 68 6f 75 74 20 | 47 58 2e 2e 2e 22 29 3b |without |GX...");|
|00001fd0| 0d 09 0d 7d 0d 0d 0d 0d | 2f 2a 2d 2d 2d 2d 2d 2d |...}....|/*------|
|00001fe0| 20 53 65 74 55 70 47 58 | 44 65 62 75 67 67 69 6e | SetUpGX|Debuggin|
|00001ff0| 67 57 6f 72 6c 64 20 2d | 2d 2d 2d 2d 2d 2d 2d 2d |gWorld -|--------|
|00002000| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002010| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002020| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002030| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|00002040| 2f 0d 2f 2f 0d 2f 2f 09 | 54 68 69 73 20 66 75 6e |/.//.//.|This fun|
|00002050| 63 74 69 6f 6e 20 65 6e | 61 62 6c 65 73 20 74 68 |ction en|ables th|
|00002060| 65 20 47 58 20 65 72 72 | 6f 72 20 68 61 6e 64 6c |e GX err|or handl|
|00002070| 69 6e 67 20 63 61 70 61 | 62 69 6c 69 74 69 65 73 |ing capa|bilities|
|00002080| 20 61 6e 64 20 76 61 6c | 69 64 61 74 69 6f 6e 20 | and val|idation |
|00002090| 72 6f 75 74 69 6e 65 73 | 2e 20 54 68 65 20 76 61 |routines|. The va|
|000020a0| 6c 69 64 61 74 69 6f 6e | 0d 2f 2f 09 72 6f 75 74 |lidation|.//.rout|
|000020b0| 69 6e 65 73 20 61 72 65 | 20 6f 6e 6c 79 20 65 6e |ines are| only en|
|000020c0| 61 62 6c 65 64 2c 20 69 | 66 20 74 68 65 20 75 73 |abled, i|f the us|
|000020d0| 65 72 20 68 61 73 20 69 | 6e 73 74 61 6c 6c 65 64 |er has i|nstalled|
|000020e0| 20 74 68 65 20 51 75 69 | 63 6b 44 72 61 77 20 47 | the Qui|ckDraw G|
|000020f0| 58 20 64 65 62 75 67 67 | 69 6e 67 20 69 6e 69 74 |X debugg|ing init|
|00002100| 2e 20 54 68 65 73 65 20 | 72 6f 75 74 69 6e 65 73 |. These |routines|
|00002110| 0d 2f 2f 09 61 72 65 20 | 6e 6f 74 20 61 76 61 69 |.//.are |not avai|
|00002120| 6c 61 62 6c 65 20 77 69 | 74 68 20 74 68 65 20 6e |lable wi|th the n|
|00002130| 6f 6e 2d 64 65 62 75 67 | 67 69 6e 67 20 69 6e 69 |on-debug|ging ini|
|00002140| 74 2e 20 43 61 6c 6c 69 | 6e 67 20 74 68 65 6d 20 |t. Calli|ng them |
|00002150| 77 68 65 6e 20 74 68 65 | 79 20 61 72 65 20 6e 6f |when the|y are no|
|00002160| 74 20 69 6e 73 74 61 6c | 6c 65 64 20 77 69 6c 6c |t instal|led will|
|00002170| 20 6e 6f 74 20 0d 2f 2f | 09 63 61 75 73 65 20 61 | not .//|.cause a|
|00002180| 6e 79 20 70 72 6f 62 6c | 65 6d 73 2c 20 62 75 74 |ny probl|ems, but|
|00002190| 20 69 74 20 77 69 6c 6c | 20 63 61 75 73 65 20 75 | it will| cause u|
|000021a0| 6e 6e 65 63 65 73 73 61 | 72 79 20 77 6f 72 6b 20 |nnecessa|ry work |
|000021b0| 74 6f 20 62 65 20 64 6f | 6e 65 20 62 79 20 79 6f |to be do|ne by yo|
|000021c0| 75 72 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 61 |ur appli|cation a|
|000021d0| 6e 64 20 74 68 65 20 47 | 58 20 0d 2f 2f 09 64 69 |nd the G|X .//.di|
|000021e0| 73 70 61 74 63 68 65 72 | 2e 0d 2f 2f 0d 76 6f 69 |spatcher|..//.voi|
|000021f0| 64 20 53 65 74 55 70 47 | 58 44 65 62 75 67 67 69 |d SetUpG|XDebuggi|
|00002200| 6e 67 57 6f 72 6c 64 20 | 28 42 6f 6f 6c 65 61 6e |ngWorld |(Boolean|
|00002210| 20 64 65 62 75 67 67 69 | 6e 67 49 6e 69 74 49 6e | debuggi|ngInitIn|
|00002220| 73 74 61 6c 6c 65 64 29 | 0d 7b 0d 20 20 09 2f 2f |stalled)|.{. .//|
|00002230| 20 0d 09 2f 2f 09 57 65 | 20 73 65 74 2d 75 70 20 | ..//.We| set-up |
|00002240| 47 58 20 76 61 6c 69 64 | 61 74 69 6f 6e 2c 20 69 |GX valid|ation, i|
|00002250| 66 20 74 68 65 20 75 73 | 65 72 20 68 61 73 20 69 |f the us|er has i|
|00002260| 6e 73 74 61 6c 6c 65 64 | 20 74 68 65 20 22 47 58 |nstalled| the "GX|
|00002270| 47 72 61 70 68 69 63 73 | 20 28 64 65 62 75 67 29 |Graphics| (debug)|
|00002280| 22 20 69 6e 69 74 20 28 | 66 6f 72 6d 65 72 6c 79 |" init (|formerly|
|00002290| 0d 09 2f 2f 09 6e 61 6d | 65 64 20 22 61 53 65 63 |..//.nam|ed "aSec|
|000022a0| 72 65 74 47 72 61 70 68 | 69 63 73 2e 64 65 62 75 |retGraph|ics.debu|
|000022b0| 67 29 2e 20 54 68 69 73 | 20 76 61 6c 69 64 61 74 |g). This| validat|
|000022c0| 69 6f 6e 20 73 65 74 74 | 69 6e 67 20 69 73 20 74 |ion sett|ing is t|
|000022d0| 68 65 20 72 65 63 63 6f | 6d 6d 65 6e 64 65 64 20 |he recco|mmended |
|000022e0| 73 65 74 74 69 6e 67 20 | 77 68 69 6c 65 0d 09 2f |setting |while../|
|000022f0| 2f 09 79 6f 75 20 61 72 | 65 20 64 65 76 65 6c 6f |/.you ar|e develo|
|00002300| 70 69 6e 67 20 79 6f 75 | 72 20 47 58 20 61 70 70 |ping you|r GX app|
|00002310| 6c 69 63 61 74 69 6f 6e | 2e 20 41 73 20 79 6f 75 |lication|. As you|
|00002320| 20 69 6e 63 72 65 61 73 | 65 20 74 68 65 20 61 6d | increas|e the am|
|00002330| 6f 75 6e 74 20 6f 66 20 | 76 61 6c 69 64 61 74 69 |ount of |validati|
|00002340| 6f 6e 2c 20 74 68 65 20 | 64 72 61 77 69 6e 67 0d |on, the |drawing.|
|00002350| 09 2f 2f 09 73 70 65 65 | 64 20 77 69 6c 6c 20 53 |.//.spee|d will S|
|00002360| 4c 4f 57 20 64 6f 77 6e | 20 64 75 65 20 74 6f 20 |LOW down| due to |
|00002370| 61 6c 6c 20 6f 66 20 74 | 68 65 20 69 6e 74 65 72 |all of t|he inter|
|00002380| 6e 61 6c 20 63 68 65 63 | 6b 69 6e 67 2e 20 0d 09 |nal chec|king. ..|
|00002390| 2f 2f 0d 09 2f 2f 09 46 | 6f 72 20 61 64 64 69 74 |//..//.F|or addit|
|000023a0| 69 6f 6e 61 6c 20 64 65 | 74 61 69 6c 73 20 72 65 |ional de|tails re|
|000023b0| 67 61 72 64 69 6e 67 20 | 74 68 65 20 76 61 72 69 |garding |the vari|
|000023c0| 6f 75 73 20 6c 65 76 65 | 6c 73 20 6f 66 20 76 61 |ous leve|ls of va|
|000023d0| 6c 69 64 61 74 69 6f 6e | 2c 20 70 6c 65 61 73 65 |lidation|, please|
|000023e0| 20 73 65 65 20 74 68 65 | 0d 09 2f 2f 09 51 75 69 | see the|..//.Qui|
|000023f0| 63 6b 44 72 61 77 20 47 | 58 20 3a 20 45 6e 76 69 |ckDraw G|X : Envi|
|00002400| 72 6f 6e 6d 65 6e 74 20 | 26 20 55 74 69 6c 69 74 |ronment |& Utilit|
|00002410| 69 65 73 20 62 6f 6f 6b | 2e 0d 09 2f 2f 0d 09 69 |ies book|...//..i|
|00002420| 66 20 28 20 64 65 62 75 | 67 67 69 6e 67 49 6e 69 |f ( debu|ggingIni|
|00002430| 74 49 6e 73 74 61 6c 6c | 65 64 20 29 20 47 58 53 |tInstall|ed ) GXS|
|00002440| 65 74 56 61 6c 69 64 61 | 74 69 6f 6e 28 67 78 50 |etValida|tion(gxP|
|00002450| 75 62 6c 69 63 56 61 6c | 69 64 61 74 69 6f 6e 20 |ublicVal|idation |
|00002460| 2b 20 67 78 54 79 70 65 | 56 61 6c 69 64 61 74 69 |+ gxType|Validati|
|00002470| 6f 6e 29 3b 20 0d 0d 09 | 2f 2f 20 0d 09 2f 2f 09 |on); ...|// ..//.|
|00002480| 43 61 6c 6c 69 6e 67 20 | 53 65 74 47 72 61 70 68 |Calling |SetGraph|
|00002490| 69 63 73 4c 69 62 72 61 | 72 79 45 72 72 6f 72 73 |icsLibra|ryErrors|
|000024a0| 20 77 69 6c 6c 20 69 6e | 73 74 61 6c 6c 20 61 20 | will in|stall a |
|000024b0| 47 58 20 65 72 72 6f 72 | 20 61 6e 64 20 77 61 72 |GX error| and war|
|000024c0| 6e 69 6e 67 20 68 61 6e | 64 6c 65 72 2e 20 54 68 |ning han|dler. Th|
|000024d0| 69 73 0d 09 2f 2f 09 63 | 61 6c 6c 20 69 73 20 70 |is..//.c|all is p|
|000024e0| 72 6f 76 69 64 65 64 20 | 62 79 20 74 68 65 20 51 |rovided |by the Q|
|000024f0| 75 69 63 6b 44 72 61 77 | 20 47 58 20 22 67 72 61 |uickDraw| GX "gra|
|00002500| 70 68 69 63 73 20 64 65 | 62 75 67 67 69 6e 67 20 |phics de|bugging |
|00002510| 6c 69 62 72 61 72 79 22 | 2e 20 41 6e 79 20 74 69 |library"|. Any ti|
|00002520| 6d 65 20 61 20 47 58 20 | 65 72 72 6f 72 0d 09 2f |me a GX |error../|
|00002530| 2f 09 6f 72 20 77 61 72 | 6e 69 6e 67 20 69 73 20 |/.or war|ning is |
|00002540| 67 65 6e 65 72 61 74 65 | 64 2c 20 69 74 20 77 69 |generate|d, it wi|
|00002550| 6c 6c 20 62 65 20 70 6f | 73 74 65 64 20 74 6f 20 |ll be po|sted to |
|00002560| 4d 61 63 73 62 75 67 2e | 0d 09 2f 2f 0d 09 53 65 |Macsbug.|..//..Se|
|00002570| 74 47 72 61 70 68 69 63 | 73 4c 69 62 72 61 72 79 |tGraphic|sLibrary|
|00002580| 45 72 72 6f 72 73 20 28 | 29 3b 0d 09 09 0d 09 2f |Errors (|);...../|
|00002590| 2f 0d 09 2f 2f 09 49 66 | 20 74 68 65 20 75 73 65 |/..//.If| the use|
|000025a0| 72 20 68 61 73 20 69 6e | 73 74 61 6c 6c 65 64 20 |r has in|stalled |
|000025b0| 74 68 65 20 47 58 20 64 | 65 62 75 67 67 69 6e 67 |the GX d|ebugging|
|000025c0| 20 76 65 72 73 69 6f 6e | 2c 20 77 65 20 69 6e 73 | version|, we ins|
|000025d0| 74 61 6c 6c 20 61 20 6e | 6f 74 69 63 65 20 68 61 |tall a n|otice ha|
|000025e0| 6e 64 6c 65 72 2e 20 57 | 68 79 3f 20 54 68 65 0d |ndler. W|hy? The.|
|000025f0| 09 2f 2f 09 47 58 20 6e | 6f 74 69 63 65 20 68 61 |.//.GX n|otice ha|
|00002600| 6e 64 6c 69 6e 67 20 63 | 61 70 61 62 69 6c 69 74 |ndling c|apabilit|
|00002610| 69 65 73 20 61 72 65 20 | 6f 6e 6c 79 20 61 76 61 |ies are |only ava|
|00002620| 69 6c 61 62 6c 65 20 77 | 69 74 68 20 74 68 65 20 |ilable w|ith the |
|00002630| 64 65 62 75 67 67 69 6e | 67 20 76 65 72 73 69 6f |debuggin|g versio|
|00002640| 6e 2e 0d 09 2f 2f 0d 09 | 69 66 20 28 20 64 65 62 |n...//..|if ( deb|
|00002650| 75 67 67 69 6e 67 49 6e | 69 74 49 6e 73 74 61 6c |uggingIn|itInstal|
|00002660| 6c 65 64 20 29 20 53 65 | 74 47 72 61 70 68 69 63 |led ) Se|tGraphic|
|00002670| 73 4c 69 62 72 61 72 79 | 4e 6f 74 69 63 65 73 28 |sLibrary|Notices(|
|00002680| 29 3b 0d 7d 0d 0d 0d 0d | 2f 2a 2d 2d 2d 2d 2d 2d |);.}....|/*------|
|00002690| 20 47 65 74 57 69 6e 64 | 6f 77 42 6f 75 6e 64 73 | GetWind|owBounds|
|000026a0| 53 68 61 70 65 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |Shape --|--------|
|000026b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000026c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000026d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000026e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|000026f0| 2f 0d 0d 67 78 53 68 61 | 70 65 20 20 47 65 74 57 |/..gxSha|pe GetW|
|00002700| 69 6e 64 6f 77 42 6f 75 | 6e 64 73 53 68 61 70 65 |indowBou|ndsShape|
|00002710| 28 29 0d 7b 0d 09 52 65 | 63 74 09 09 09 09 74 68 |().{..Re|ct....th|
|00002720| 65 52 65 63 74 3b 0d 09 | 50 6f 69 6e 74 09 09 09 |eRect;..|Point...|
|00002730| 09 51 44 74 6f 70 4c 65 | 66 74 3b 0d 09 50 6f 69 |.QDtopLe|ft;..Poi|
|00002740| 6e 74 09 09 09 09 51 44 | 62 6f 74 52 69 67 68 74 |nt....QD|botRight|
|00002750| 3b 0d 09 67 78 50 6f 69 | 6e 74 09 09 09 09 51 44 |;..gxPoi|nt....QD|
|00002760| 47 58 74 6f 70 4c 65 66 | 74 3b 0d 09 67 78 50 6f |GXtopLef|t;..gxPo|
|00002770| 69 6e 74 09 09 09 09 51 | 44 47 58 62 6f 74 52 69 |int....Q|DGXbotRi|
|00002780| 67 68 74 3b 0d 09 67 78 | 52 65 63 74 61 6e 67 6c |ght;..gx|Rectangl|
|00002790| 65 09 09 09 74 68 65 51 | 44 47 58 52 65 63 74 3b |e...theQ|DGXRect;|
|000027a0| 0d 09 0d 09 2f 2f 0d 09 | 2f 2f 20 54 68 65 20 51 |....//..|// The Q|
|000027b0| 75 69 63 6b 44 72 61 77 | 20 72 65 63 74 20 61 6e |uickDraw| rect an|
|000027c0| 64 20 70 6f 69 6e 74 73 | 20 77 68 69 63 68 20 72 |d points| which r|
|000027d0| 65 70 72 65 73 65 6e 74 | 20 74 68 65 20 70 6f 72 |epresent| the por|
|000027e0| 74 52 65 63 74 20 6f 66 | 20 74 68 65 20 77 69 6e |tRect of| the win|
|000027f0| 64 6f 77 2e 20 0d 09 2f | 2f 0d 09 74 68 65 52 65 |dow. ../|/..theRe|
|00002800| 63 74 20 3d 20 67 57 69 | 6e 64 6f 77 2d 3e 70 6f |ct = gWi|ndow->po|
|00002810| 72 74 52 65 63 74 3b 0d | 09 51 44 74 6f 70 4c 65 |rtRect;.|.QDtopLe|
|00002820| 66 74 2e 68 20 3d 20 74 | 68 65 52 65 63 74 2e 6c |ft.h = t|heRect.l|
|00002830| 65 66 74 3b 0d 09 51 44 | 74 6f 70 4c 65 66 74 2e |eft;..QD|topLeft.|
|00002840| 76 20 3d 20 74 68 65 52 | 65 63 74 2e 74 6f 70 3b |v = theR|ect.top;|
|00002850| 0d 09 51 44 62 6f 74 52 | 69 67 68 74 2e 68 20 3d |..QDbotR|ight.h =|
|00002860| 20 74 68 65 52 65 63 74 | 2e 72 69 67 68 74 3b 0d | theRect|.right;.|
|00002870| 09 51 44 62 6f 74 52 69 | 67 68 74 2e 76 20 3d 20 |.QDbotRi|ght.v = |
|00002880| 74 68 65 52 65 63 74 2e | 62 6f 74 74 6f 6d 3b 0d |theRect.|bottom;.|
|00002890| 20 09 0d 09 2f 2f 0d 09 | 2f 2f 20 20 43 6f 6e 76 | ...//..|// Conv|
|000028a0| 65 72 74 20 74 68 65 20 | 67 6c 6f 62 61 6c 20 51 |ert the |global Q|
|000028b0| 75 69 63 6b 64 72 61 77 | 20 63 6f 6f 72 64 69 6e |uickdraw| coordin|
|000028c0| 61 74 65 73 20 74 6f 20 | 6c 6f 63 61 6c 20 66 69 |ates to |local fi|
|000028d0| 78 65 64 20 63 6f 6f 72 | 64 69 6e 61 74 65 73 2e |xed coor|dinates.|
|000028e0| 0d 09 2f 2f 0d 09 47 58 | 43 6f 6e 76 65 72 74 51 |..//..GX|ConvertQ|
|000028f0| 44 50 6f 69 6e 74 28 26 | 51 44 74 6f 70 4c 65 66 |DPoint(&|QDtopLef|
|00002900| 74 2c 20 30 2c 20 26 51 | 44 47 58 74 6f 70 4c 65 |t, 0, &Q|DGXtopLe|
|00002910| 66 74 29 3b 0d 09 47 58 | 43 6f 6e 76 65 72 74 51 |ft);..GX|ConvertQ|
|00002920| 44 50 6f 69 6e 74 28 26 | 51 44 62 6f 74 52 69 67 |DPoint(&|QDbotRig|
|00002930| 68 74 2c 20 30 2c 20 26 | 51 44 47 58 62 6f 74 52 |ht, 0, &|QDGXbotR|
|00002940| 69 67 68 74 29 3b 0d 0d | 09 2f 2f 0d 09 2f 2f 20 |ight);..|.//..// |
|00002950| 20 53 65 74 75 70 20 74 | 68 65 20 64 69 6d 65 6e | Setup t|he dimen|
|00002960| 73 69 6f 6e 73 20 66 6f | 72 20 22 67 57 69 6e 64 |sions fo|r "gWind|
|00002970| 6f 77 42 6f 75 6e 64 73 | 53 68 61 70 65 22 0d 09 |owBounds|Shape"..|
|00002980| 2f 2f 0d 09 74 68 65 51 | 44 47 58 52 65 63 74 2e |//..theQ|DGXRect.|
|00002990| 74 6f 70 20 3d 20 51 44 | 47 58 74 6f 70 4c 65 66 |top = QD|GXtopLef|
|000029a0| 74 2e 79 3b 0d 09 74 68 | 65 51 44 47 58 52 65 63 |t.y;..th|eQDGXRec|
|000029b0| 74 2e 6c 65 66 74 20 3d | 20 51 44 47 58 74 6f 70 |t.left =| QDGXtop|
|000029c0| 4c 65 66 74 2e 78 3b 0d | 09 74 68 65 51 44 47 58 |Left.x;.|.theQDGX|
|000029d0| 52 65 63 74 2e 62 6f 74 | 74 6f 6d 20 3d 20 51 44 |Rect.bot|tom = QD|
|000029e0| 47 58 62 6f 74 52 69 67 | 68 74 2e 79 3b 0d 09 74 |GXbotRig|ht.y;..t|
|000029f0| 68 65 51 44 47 58 52 65 | 63 74 2e 72 69 67 68 74 |heQDGXRe|ct.right|
|00002a00| 20 3d 20 51 44 47 58 62 | 6f 74 52 69 67 68 74 2e | = QDGXb|otRight.|
|00002a10| 78 3b 0d 09 0d 09 72 65 | 74 75 72 6e 20 28 47 58 |x;....re|turn (GX|
|00002a20| 4e 65 77 52 65 63 74 61 | 6e 67 6c 65 28 26 74 68 |NewRecta|ngle(&th|
|00002a30| 65 51 44 47 58 52 65 63 | 74 29 29 3b 0d 7d 0d 0d |eQDGXRec|t));.}..|
|00002a40| 0d 0d 2f 2a 2d 2d 2d 2d | 2d 2d 20 45 76 65 6e 74 |../*----|-- Event|
|00002a50| 4c 6f 6f 70 20 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |Loop ---|--------|
|00002a60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002aa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2f 0d 0d 42 6f 6f |--------|-*/..Boo|
|00002ab0| 6c 65 61 6e 20 45 76 65 | 6e 74 4c 6f 6f 70 28 29 |lean Eve|ntLoop()|
|00002ac0| 0d 7b 0d 09 73 74 61 74 | 69 63 20 6c 6f 6e 67 20 |.{..stat|ic long |
|00002ad0| 09 73 6c 65 65 70 20 3d | 20 30 3b 0d 0d 09 57 61 |.sleep =| 0;...Wa|
|00002ae0| 69 74 4e 65 78 74 45 76 | 65 6e 74 28 65 76 65 72 |itNextEv|ent(ever|
|00002af0| 79 45 76 65 6e 74 2c 20 | 26 67 74 68 65 45 76 65 |yEvent, |>heEve|
|00002b00| 6e 74 2c 20 73 6c 65 65 | 70 2c 20 6e 69 6c 29 3b |nt, slee|p, nil);|
|00002b10| 0d 09 20 20 20 20 20 0d | 09 73 77 69 74 63 68 28 |.. .|.switch(|
|00002b20| 67 74 68 65 45 76 65 6e | 74 2e 77 68 61 74 29 0d |gtheEven|t.what).|
|00002b30| 09 7b 09 09 09 09 09 0d | 09 09 63 61 73 65 20 75 |.{......|..case u|
|00002b40| 70 64 61 74 65 45 76 74 | 3a 0d 09 09 20 20 20 20 |pdateEvt|:... |
|00002b50| 20 20 20 20 42 65 67 69 | 6e 55 70 64 61 74 65 28 | Begi|nUpdate(|
|00002b60| 28 57 69 6e 64 6f 77 50 | 74 72 29 20 67 74 68 65 |(WindowP|tr) gthe|
|00002b70| 45 76 65 6e 74 2e 6d 65 | 73 73 61 67 65 29 3b 0d |Event.me|ssage);.|
|00002b80| 09 09 09 09 53 65 74 50 | 6f 72 74 28 67 57 69 6e |....SetP|ort(gWin|
|00002b90| 64 6f 77 29 3b 0d 09 09 | 09 09 44 6f 44 72 61 77 |dow);...|..DoDraw|
|00002ba0| 28 67 57 69 6e 64 6f 77 | 29 3b 0d 09 09 09 20 20 |(gWindow|);.... |
|00002bb0| 20 20 45 6e 64 55 70 64 | 61 74 65 28 28 57 69 6e | EndUpd|ate((Win|
|00002bc0| 64 6f 77 50 74 72 29 20 | 67 74 68 65 45 76 65 6e |dowPtr) |gtheEven|
|00002bd0| 74 2e 6d 65 73 73 61 67 | 65 29 3b 0d 09 09 62 72 |t.messag|e);...br|
|00002be0| 65 61 6b 3b 0d 09 09 0d | 09 09 63 61 73 65 20 6d |eak;....|..case m|
|00002bf0| 6f 75 73 65 44 6f 77 6e | 3a 0d 09 09 09 73 77 69 |ouseDown|:....swi|
|00002c00| 74 63 68 20 28 46 69 6e | 64 57 69 6e 64 6f 77 28 |tch (Fin|dWindow(|
|00002c10| 67 74 68 65 45 76 65 6e | 74 2e 77 68 65 72 65 2c |gtheEven|t.where,|
|00002c20| 20 26 77 68 69 63 68 57 | 69 6e 64 6f 77 29 29 20 | &whichW|indow)) |
|00002c30| 7b 0d 09 09 09 09 63 61 | 73 65 20 69 6e 53 79 73 |{.....ca|se inSys|
|00002c40| 57 69 6e 64 6f 77 3a 0d | 09 09 09 09 09 53 79 73 |Window:.|.....Sys|
|00002c50| 74 65 6d 43 6c 69 63 6b | 28 26 67 74 68 65 45 76 |temClick|(>heEv|
|00002c60| 65 6e 74 2c 20 77 68 69 | 63 68 57 69 6e 64 6f 77 |ent, whi|chWindow|
|00002c70| 29 3b 0d 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |);.....b|reak;...|
|00002c80| 09 09 09 09 0d 09 09 09 | 09 63 61 73 65 20 69 6e |........|.case in|
|00002c90| 44 72 61 67 3a 0d 09 09 | 09 09 20 20 20 20 44 72 |Drag:...|.. Dr|
|00002ca0| 61 67 57 69 6e 64 6f 77 | 28 77 68 69 63 68 57 69 |agWindow|(whichWi|
|00002cb0| 6e 64 6f 77 2c 20 67 74 | 68 65 45 76 65 6e 74 2e |ndow, gt|heEvent.|
|00002cc0| 77 68 65 72 65 2c 20 26 | 71 64 2e 73 63 72 65 65 |where, &|qd.scree|
|00002cd0| 6e 42 69 74 73 2e 62 6f | 75 6e 64 73 29 3b 0d 09 |nBits.bo|unds);..|
|00002ce0| 09 09 09 62 72 65 61 6b | 3b 0d 0d 09 09 09 09 63 |...break|;......c|
|00002cf0| 61 73 65 20 69 6e 47 6f | 41 77 61 79 3a 0d 09 09 |ase inGo|Away:...|
|00002d00| 09 09 09 69 66 20 28 54 | 72 61 63 6b 47 6f 41 77 |...if (T|rackGoAw|
|00002d10| 61 79 28 77 68 69 63 68 | 57 69 6e 64 6f 77 2c 20 |ay(which|Window, |
|00002d20| 67 74 68 65 45 76 65 6e | 74 2e 77 68 65 72 65 29 |gtheEven|t.where)|
|00002d30| 29 0d 09 09 09 09 09 09 | 72 65 74 75 72 6e 20 66 |).......|return f|
|00002d40| 61 6c 73 65 3b 0d 09 09 | 09 09 62 72 65 61 6b 3b |alse;...|..break;|
|00002d50| 0d 09 09 09 09 0d 09 09 | 09 09 63 61 73 65 20 69 |........|..case i|
|00002d60| 6e 43 6f 6e 74 65 6e 74 | 3a 0d 09 09 09 09 09 69 |nContent|:......i|
|00002d70| 66 20 28 77 68 69 63 68 | 57 69 6e 64 6f 77 20 21 |f (which|Window !|
|00002d80| 3d 20 46 72 6f 6e 74 57 | 69 6e 64 6f 77 28 29 29 |= FrontW|indow())|
|00002d90| 0d 09 09 09 09 09 20 09 | 53 65 6c 65 63 74 57 69 |...... .|SelectWi|
|00002da0| 6e 64 6f 77 28 77 68 69 | 63 68 57 69 6e 64 6f 77 |ndow(whi|chWindow|
|00002db0| 29 3b 0d 09 09 09 09 09 | 20 65 6c 73 65 0d 09 09 |);......| else...|
|00002dc0| 09 09 09 20 7b 0d 09 09 | 09 09 09 20 09 67 78 50 |... {...|... .gxP|
|00002dd0| 6f 69 6e 74 09 09 6d 6f | 75 73 65 4c 6f 63 3b 0d |oint..mo|useLoc;.|
|00002de0| 09 09 09 09 09 20 09 50 | 6f 69 6e 74 09 09 63 75 |..... .P|oint..cu|
|00002df0| 72 72 4d 6f 75 73 65 4c | 6f 63 3b 0d 09 09 09 09 |rrMouseL|oc;.....|
|00002e00| 09 20 09 0d 09 09 09 09 | 09 20 09 63 75 72 72 4d |. ......|. .currM|
|00002e10| 6f 75 73 65 4c 6f 63 2e | 68 20 3d 20 67 74 68 65 |ouseLoc.|h = gthe|
|00002e20| 45 76 65 6e 74 2e 77 68 | 65 72 65 2e 68 3b 0d 09 |Event.wh|ere.h;..|
|00002e30| 09 09 09 09 20 09 63 75 | 72 72 4d 6f 75 73 65 4c |.... .cu|rrMouseL|
|00002e40| 6f 63 2e 76 20 3d 20 67 | 74 68 65 45 76 65 6e 74 |oc.v = g|theEvent|
|00002e50| 2e 77 68 65 72 65 2e 76 | 3b 0d 09 09 09 09 09 20 |.where.v|;...... |
|00002e60| 09 0d 09 09 09 09 09 09 | 47 58 43 6f 6e 76 65 72 |........|GXConver|
|00002e70| 74 51 44 50 6f 69 6e 74 | 28 26 63 75 72 72 4d 6f |tQDPoint|(&currMo|
|00002e80| 75 73 65 4c 6f 63 2c 20 | 67 54 68 65 57 69 6e 64 |useLoc, |gTheWind|
|00002e90| 6f 77 73 56 69 65 77 50 | 6f 72 74 2c 20 26 6d 6f |owsViewP|ort, &mo|
|00002ea0| 75 73 65 4c 6f 63 29 3b | 0d 0d 09 09 09 09 09 20 |useLoc);|....... |
|00002eb0| 09 44 6f 43 6c 69 63 6b | 28 6d 6f 75 73 65 4c 6f |.DoClick|(mouseLo|
|00002ec0| 63 2c 20 67 57 69 6e 64 | 6f 77 29 3b 0d 09 09 09 |c, gWind|ow);....|
|00002ed0| 09 09 20 7d 0d 09 09 09 | 09 62 72 65 61 6b 3b 0d |.. }....|.break;.|
|00002ee0| 0d 09 09 09 7d 0d 09 09 | 09 0d 09 09 63 61 73 65 |....}...|....case|
|00002ef0| 20 6b 4f 53 45 76 65 6e | 74 3a 0d 09 09 09 73 77 | kOSEven|t:....sw|
|00002f00| 69 74 63 68 20 28 28 75 | 6e 73 69 67 6e 65 64 20 |itch ((u|nsigned |
|00002f10| 6c 6f 6e 67 29 20 67 74 | 68 65 45 76 65 6e 74 2e |long) gt|heEvent.|
|00002f20| 6d 65 73 73 61 67 65 20 | 3e 3e 20 32 34 29 20 7b |message |>> 24) {|
|00002f30| 09 2f 2f 20 20 68 69 67 | 68 20 62 79 74 65 20 6f |.// hig|h byte o|
|00002f40| 66 20 6d 65 73 73 61 67 | 65 0d 09 09 09 20 09 63 |f messag|e.... .c|
|00002f50| 61 73 65 20 6b 53 75 73 | 70 65 6e 64 52 65 73 75 |ase kSus|pendResu|
|00002f60| 6d 65 4d 65 73 73 61 67 | 65 3a 09 09 09 2f 2f 20 |meMessag|e:...// |
|00002f70| 20 73 75 73 70 65 6e 64 | 2f 72 65 73 75 6d 65 20 | suspend|/resume |
|00002f80| 69 73 20 61 6c 73 6f 20 | 61 6e 20 61 63 74 69 76 |is also |an activ|
|00002f90| 61 74 65 2f 64 65 61 63 | 74 69 76 61 74 65 0d 09 |ate/deac|tivate..|
|00002fa0| 09 09 09 09 69 66 20 28 | 28 67 74 68 65 45 76 65 |....if (|(gtheEve|
|00002fb0| 6e 74 2e 6d 65 73 73 61 | 67 65 20 26 20 6b 52 65 |nt.messa|ge & kRe|
|00002fc0| 73 75 6d 65 4d 61 73 6b | 29 20 3d 3d 20 30 29 0d |sumeMask|) == 0).|
|00002fd0| 09 09 09 09 09 20 20 20 | 73 6c 65 65 70 20 3d 20 |..... |sleep = |
|00002fe0| 38 30 3b 09 09 09 09 09 | 2f 2f 20 77 65 20 61 72 |80;.....|// we ar|
|00002ff0| 65 20 68 65 61 64 65 64 | 20 74 6f 20 74 68 65 20 |e headed| to the |
|00003000| 62 61 63 6b 67 72 6f 75 | 6e 64 2c 20 73 6f 20 73 |backgrou|nd, so s|
|00003010| 6c 6f 77 20 64 6f 77 6e | 2e 2e 2e 20 20 0d 09 09 |low down|... ...|
|00003020| 09 09 09 65 6c 73 65 0d | 09 09 09 09 09 20 20 20 |...else.|..... |
|00003030| 73 6c 65 65 70 20 3d 20 | 30 3b 09 09 09 09 09 2f |sleep = |0;...../|
|00003040| 2f 20 77 65 20 61 72 65 | 20 68 65 61 64 65 64 20 |/ we are| headed |
|00003050| 74 6f 20 74 68 65 20 66 | 6f 72 65 67 72 6f 75 6e |to the f|oregroun|
|00003060| 64 2c 20 73 6f 20 73 70 | 65 65 64 20 75 70 2e 2e |d, so sp|eed up..|
|00003070| 2e 20 0d 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |. .....b|reak;...|
|00003080| 09 7d 0d 09 09 20 20 20 | 20 20 20 20 20 62 72 65 |.}... | bre|
|00003090| 61 6b 3b 0d 09 7d 0d 09 | 72 65 74 75 72 6e 20 74 |ak;..}..|return t|
|000030a0| 72 75 65 3b 0d 7d 0d 0d | 00 00 00 00 00 00 00 00 |rue;.}..|........|
|000030b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003100| 00 00 01 00 00 00 04 8c | 00 00 03 8c 00 00 01 16 |........|........|
|00003110| 72 65 67 69 73 74 72 61 | 74 69 6f 6e 20 2a 2f 0d |registra|tion */.|
|00003120| 66 6f 6e 74 20 4e 65 77 | 46 6f 6e 74 28 66 6f 6e |font New|Font(fon|
|00003130| 10 67 72 61 70 68 69 63 | 73 20 73 68 65 6c 6c 2e |.graphic|s shell.|
|00003140| 63 61 02 00 00 00 54 45 | 58 54 4b 41 48 4c 01 00 |ca....TE|XTKAHL..|
|00003150| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 45 00 14 |..TEXTKA|HL...E..|
|00003160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003170| 00 00 a2 35 ac 41 00 00 | 30 28 00 00 05 a2 2c 20 |...5.A..|0(...., |
|00003180| 66 6f 6e 74 2a 20 66 61 | 6d 69 6c 79 29 3b 0d 76 |font* fa|mily);.v|
|00003190| 6f 69 64 20 53 65 74 46 | 6f 6e 74 28 66 6f 6e 74 |oid SetF|ont(font|
|000031a0| 2c 20 66 6f 6e 74 53 74 | 6f 72 61 67 65 54 79 70 |, fontSt|orageTyp|
|000031b0| 65 2c 20 76 6f 69 64 2a | 20 72 65 66 63 6f 6e 2c |e, void*| refcon,|
|000031c0| 20 66 6f 6e 74 20 66 61 | 6d 69 6c 79 29 3b 0d 76 | font fa|mily);.v|
|000031d0| 6f 69 64 20 44 69 73 70 | 6f 73 65 46 6f 6e 74 28 |oid Disp|oseFont(|
|000031e0| 66 6f 6e 74 29 3b 0d 0d | 2f 2a 20 66 6f 6e 74 20 |font);..|/* font |
|000031f0| 65 6e 75 6d 65 72 61 74 | 69 6f 6e 2f 73 65 6c 65 |enumerat|ion/sele|
|00003200| 00 00 00 0a 00 00 14 0d | ff ff 00 00 00 00 00 00 |........|........|
|00003210| 00 0a 00 00 14 0d ff ff | 00 00 00 00 00 00 00 0a |........|........|
|00003220| 00 00 14 0d ff ff 00 00 | 00 00 00 00 00 0a 00 00 |........|........|
|00003230| 14 0d ff ff 00 00 00 00 | 00 00 00 0a 00 00 14 0d |........|........|
|00003240| ff ff 00 00 00 00 00 00 | 00 0a 00 00 14 0d ff ff |........|........|
|00003250| 00 00 00 00 00 00 00 78 | 00 00 65 61 00 48 00 48 |.......x|..ea.H.H|
|00003260| 00 00 00 00 02 f0 02 40 | ff dc ff ee 02 f4 02 52 |.......@|.......R|
|00003270| 65 63 05 28 03 fc 65 76 | 65 61 6c 2c 63 6f 6e 73 |ec.(..ev|eal,cons|
|00003280| 74 20 56 50 6f 69 6e 74 | 26 20 6d 69 6e 54 6f 53 |t VPoint|& minToS|
|00003290| 65 65 2c 42 6f 6f 6c 65 | 61 6e 20 72 65 64 72 61 |ee,Boole|an redra|
|000032a0| 77 29 3b 0d 09 2f 2f 76 | 69 72 74 75 61 6c 20 76 |w);..//v|irtual v|
|000032b0| 6f 69 64 20 44 6f 4b 65 | 79 45 76 65 6e 74 28 54 |oid DoKe|yEvent(T|
|000032c0| 54 6f 6f 6c 62 6f 78 45 | 76 65 6e 74 2a 20 65 76 |ToolboxE|vent* ev|
|000032d0| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 4a 00 09 |...H..Mo|naco.J..|
|000032e0| 2a 00 01 35 76 3a 00 f1 | 2e 24 00 03 24 04 00 08 |*..5v:..|.$..$...|
|000032f0| 7d 64 00 08 00 1f 00 0c | 00 02 00 38 00 15 01 f9 |}d......|...8....|
|00003300| 02 28 00 38 00 15 01 f9 | 02 28 a7 8a cc f6 00 00 |.(.8....|.(......|
|00003310| 04 7d 00 00 04 fa 00 00 | 04 3a 01 00 00 00 00 16 |.}......|.:......|
|00003320| 01 00 00 00 00 00 00 00 | 01 00 01 00 00 07 07 43 |........|.......C|
|00003330| 6f 75 72 69 65 72 00 00 | 00 28 00 00 14 4d ff ff |ourier..|.(...M..|
|00003340| 00 00 00 00 00 00 13 dc | ff ff 00 00 00 00 00 00 |........|........|
|00003350| 13 65 ff ff 00 00 00 00 | 00 00 12 f8 ff ff 00 00 |.e......|........|
|00003360| 00 00 00 00 00 1e 00 00 | 17 47 ff ff 00 00 00 00 |........|.G......|
|00003370| 00 00 28 17 01 20 00 00 | 00 00 00 00 17 47 ff ff |..(.. ..|.....G..|
|00003380| 00 00 00 00 00 00 00 22 | 00 01 00 20 00 00 28 17 |......."|... ..(.|
|00003390| 01 20 00 c4 d2 10 10 02 | 11 63 75 72 72 65 6e 74 |. ......|.current|
|000033a0| 56 61 6c 69 64 61 74 69 | 6f 6e 00 00 00 1e 00 00 |Validati|on......|
|000033b0| 13 95 00 94 00 00 00 00 | 00 00 0e ef 00 79 00 00 |........|.....y..|
|000033c0| 00 00 00 00 15 db 00 a4 | 00 00 00 00 00 00 00 34 |........|.......4|
|000033d0| 00 02 00 1a 00 00 1e ea | 00 e0 00 96 bf ac 10 04 |........|........|
|000033e0| 0b 74 68 65 46 65 61 74 | 75 72 65 20 00 18 00 00 |.theFeat|ure ....|
|000033f0| 13 95 00 94 00 96 bf 90 | 00 00 09 6e 65 77 43 6c |........|...newCl|
|00003400| 69 65 6e 74 00 00 00 0a | 00 00 11 96 00 88 00 00 |ient....|........|
|00003410| 00 00 00 00 00 92 00 04 | 00 1a 00 00 11 58 00 87 |........|.....X..|
|00003420| 00 8c d3 68 00 00 0b 74 | 68 65 46 65 61 74 75 72 |...h...t|heFeatur|
|00003430| 65 20 00 2a 00 00 11 96 | 00 88 00 8c d3 10 00 00 |e .*....|........|
|00003440| 1b 67 65 73 74 61 6c 74 | 47 72 61 70 68 69 63 73 |.gestalt|Graphics|
|00003450| 49 73 44 65 62 75 67 67 | 69 6e 67 20 00 26 00 00 |IsDebugg|ing .&..|
|00003460| 11 96 00 88 00 8c d3 00 | 00 00 17 67 65 73 74 61 |........|...gesta|
|00003470| 6c 74 47 72 61 70 68 69 | 63 73 49 73 4c 6f 61 64 |ltGraphi|csIsLoad|
|00003480| 65 64 00 26 00 00 11 ea | 00 89 00 8c d2 f0 00 00 |ed.&....|........|
|00003490| 17 64 65 62 75 67 67 69 | 6e 67 49 6e 69 74 49 6e |.debuggi|ngInitIn|
|000034a0| 73 74 61 6c 6c 65 64 20 | 00 00 00 7e 00 04 00 1e |stalled |...~....|
|000034b0| 00 00 2d 84 01 5a 00 a3 | a9 74 00 00 0f 63 75 72 |..-..Z..|.t...cur|
|000034c0| 72 4d 6f 75 73 65 4c 6f | 63 2e 68 20 00 1e 00 00 |rMouseLo|c.h ....|
|000034d0| 2d 84 01 5a 00 a3 a9 64 | 00 00 0f 63 75 72 72 4d |-..Z...d|...currM|
|000034e0| 6f 75 73 65 4c 6f 63 2e | 76 20 00 20 00 00 2d e2 |ouseLoc.|v . ..-.|
|000034f0| 01 5d 00 a3 a9 44 00 00 | 11 6d 6f 75 73 65 4c 6f |.]...D..|.mouseLo|
|00003500| 63 2e 78 20 3e 3e 20 31 | 36 20 00 20 00 00 2d e2 |c.x >> 1|6 . ..-.|
|00003510| 01 5d 00 a3 a9 34 00 00 | 11 6d 6f 75 73 65 4c 6f |.]...4..|.mouseLo|
|00003520| 63 2e 79 20 3e 3e 20 31 | 36 20 00 00 00 5e 00 04 |c.y >> 1|6 ...^..|
|00003530| 00 00 2a 35 00 00 2a 3e | 09 45 76 65 6e 74 4c 6f |..*5..*>|.EventLo|
|00003540| 6f 70 00 00 26 7c 00 00 | 26 90 15 47 65 74 57 69 |op..&|..|&..GetWi|
|00003550| 6e 64 6f 77 42 6f 75 6e | 64 73 53 68 61 70 65 00 |ndowBoun|dsShape.|
|00003560| 00 00 0c f6 00 00 0c fa | 05 6d 61 69 6e 00 00 00 |........|.main...|
|00003570| 23 f8 00 00 23 f8 15 53 | 65 74 55 70 47 58 44 65 |#...#..S|etUpGXDe|
|00003580| 62 75 67 67 69 6e 67 57 | 6f 72 6c 64 00 00 01 00 |buggingW|orld....|
|00003590| 00 00 04 8c 00 00 03 8c | 00 00 01 16 00 42 28 14 |........|.....B(.|
|000035a0| 1a d0 00 00 00 1c 01 16 | 00 03 42 4b 50 54 00 09 |........|..BKPT..|
|000035b0| 00 22 4d 50 53 52 00 02 | 00 9a 46 50 52 46 00 00 |."MPSR..|..FPRF..|
|000035c0| 00 be 44 54 56 55 00 03 | 00 ca 35 e8 ff ff 00 00 |..DTVU..|..5.....|
|000035d0| 00 00 00 00 00 00 65 f0 | ff ff 00 00 00 0e 00 00 |......e.|........|
|000035e0| 00 00 3d 22 ff ff 00 00 | 00 1c 00 00 00 00 52 60 |..="....|......R`|
|000035f0| ff ff 00 00 00 2a 00 00 | 00 00 68 f7 ff ff 00 00 |.....*..|..h.....|
|00003600| 00 38 00 00 00 00 1b cd | ff ff 00 00 00 46 00 00 |.8......|.....F..|
|00003610| 00 00 69 69 ff ff 00 00 | 01 36 00 00 00 00 78 80 |..ii....|.6....x.|
|00003620| ff ff 00 00 01 62 00 00 | 00 00 5e ef ff ff 00 00 |.....b..|..^.....|
|00003630| 01 aa 00 00 00 00 27 38 | ff ff 00 00 02 04 00 00 |......'8|........|
|00003640| 00 00 03 ee ff ff 00 00 | 00 54 00 00 00 00 03 ed |........|.T......|
|00003650| ff ff 00 00 00 d0 00 00 | 00 00 03 ef ff ff 00 00 |........|........|
|00003660| 03 2a 00 00 00 00 05 1a | ff ff 00 00 01 1c 00 00 |.*......|........|
|00003670| 00 00 6a 68 ff ff 00 00 | 01 84 00 00 00 00 58 39 |..jh....|......X9|
|00003680| ff ff 00 00 01 cc 00 00 | 00 00 20 83 ff ff 00 00 |........|.. .....|
|00003690| 02 12 00 00 00 00 6f bb | ff ff 00 00 02 a8 00 00 |......o.|........|
|000036a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+